Esempio n. 1
0
 public GeoCreateProjection(GeoProjFileSystem projectionSystem)
 {
     this.components = null;
     this.InitializeComponent();
     this.CreateButton.Visible = false;
     this.btnCancel.Text = GISCtrlGResourceEx.GIS_OK;
     this.m_ProjectionSystem = projectionSystem;
     this.m_GaussProperty = new GeoGaussParamsProperty(this.m_ProjectionSystem);
     this.m_GaussProperty.IsNameReadonly = true;
     this.m_GaussProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_DistProperty = new GeoDistortionParamsProperty(this.m_ProjectionSystem);
     this.m_DistProperty.IsNameReadonly = true;
     this.m_DistProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_ConeProperty = new GeoConeParamsProperty(this.m_ProjectionSystem);
     this.m_ConeProperty.IsNameReadonly = true;
     this.m_ConeProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_UTMProperty = new GeoUTMParamsProperty(this.m_ProjectionSystem);
     this.m_UTMProperty.IsNameReadonly = true;
     this.m_UTMProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.ChangeProjectionType(this.m_ProjectionSystem.CurrentProjParamType, this.m_ProjectionSystem.ProjectionName);
     GeoProjectionLoader.UTMZoneList = new int[60];
     for (int i = 0; i < GeoProjectionLoader.UTMZoneList.Length; i++)
     {
         GeoProjectionLoader.UTMZoneList[i] = i + 1;
     }
 }
Esempio n. 2
0
 public GeoCreateProjection()
 {
     this.components = null;
     this.InitializeComponent();
     this.m_ProjectionSystem = new GeoProjFileSystem();
     this.m_GaussProperty = new GeoGaussParamsProperty(this.m_ProjectionSystem);
     this.m_GaussProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_DistProperty = new GeoDistortionParamsProperty(this.m_ProjectionSystem);
     this.m_DistProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_ConeProperty = new GeoConeParamsProperty(this.m_ProjectionSystem);
     this.m_ConeProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.m_UTMProperty = new GeoUTMParamsProperty(this.m_ProjectionSystem);
     this.m_UTMProperty.ProjectionChangeEvent += new IAGeoProperty.ChangeProjectionEventHandler(this.ChangeProjectionType);
     this.propertyGrid1.SelectedObject = this.m_GaussProperty;
     this.m_Type = ProjParamType.GaussProjParam;
     GeoProjectionLoader.UTMZoneList = new int[60];
     for (int i = 0; i < GeoProjectionLoader.UTMZoneList.Length; i++)
     {
         GeoProjectionLoader.UTMZoneList[i] = i + 1;
     }
 }
 public GeoDistortionParamsProperty(GeoProjFileSystem newProj) : base(newProj)
 {
 }
Esempio n. 4
0
 private void SetGaussProjectionParams(GeoProjFileSystem geoProjSystem, string[] tmpLine)
 {
     geoProjSystem.GaussProjParams.name = tmpLine[2];
     geoProjSystem.GaussProjParams.latitudeOrigin = double.Parse(tmpLine[5]);
     geoProjSystem.GaussProjParams.longitudeOrigin = double.Parse(tmpLine[6]);
     geoProjSystem.GaussProjParams.xFalseNorth = double.Parse(tmpLine[7]);
     geoProjSystem.GaussProjParams.yFalseNorth = double.Parse(tmpLine[8]);
     if (tmpLine.Length > 9)
     {
         geoProjSystem.GaussProjParams.zone = int.Parse(tmpLine[9]);
     }
 }
Esempio n. 5
0
 private void SetProjectionParams(GeoProjFileSystem geoProjSystem, string[] tmpLine)
 {
     try
     {
         if (this.m_SetProjectionParamsDict.ContainsKey(geoProjSystem.CurrentProjParamType))
         {
             this.m_SetProjectionParamsDict[geoProjSystem.CurrentProjParamType](geoProjSystem, tmpLine);
         }
     }
     catch
     {
         throw new Exception("GeoProjFileSystem Reading error");
     }
 }
Esempio n. 6
0
 private void SetDistortionProjectionParams(GeoProjFileSystem geoProjSystem, string[] tmpLine)
 {
     geoProjSystem.DistortionProjParams.name = tmpLine[2];
     geoProjSystem.DistortionProjParams.latitudeOrigin = double.Parse(tmpLine[5]);
     geoProjSystem.DistortionProjParams.longitudeOrigin = double.Parse(tmpLine[6]);
     geoProjSystem.DistortionProjParams.xFalseNorth = double.Parse(tmpLine[7]);
     geoProjSystem.DistortionProjParams.yFalseNorth = double.Parse(tmpLine[8]);
     geoProjSystem.DistortionProjParams.azCentralLine = double.Parse(tmpLine[9]);
     geoProjSystem.DistortionProjParams.rectifiedToSkew = double.Parse(tmpLine[10]);
 }
Esempio n. 7
0
 private void SetConeProjectionParams(GeoProjFileSystem geoProjSystem, string[] tmpLine)
 {
     geoProjSystem.ConeProjParams.name = tmpLine[2];
     geoProjSystem.ConeProjParams.latitudeOrigin = double.Parse(tmpLine[5]);
     geoProjSystem.ConeProjParams.longitudeOrigin = double.Parse(tmpLine[6]);
     geoProjSystem.ConeProjParams.xFalseNorth = double.Parse(tmpLine[7]);
     geoProjSystem.ConeProjParams.yFalseNorth = double.Parse(tmpLine[8]);
     geoProjSystem.ConeProjParams.firstParallel = double.Parse(tmpLine[9]);
     geoProjSystem.ConeProjParams.secondParallel = double.Parse(tmpLine[10]);
 }
Esempio n. 8
0
 public bool Read()
 {
     if (string.IsNullOrEmpty(this.m_FilePath))
     {
         return false;
     }
     StreamReader reader = new StreamReader(File.OpenRead(this.m_FilePath), Encoding.Default);
     string[] separator = new string[] { " ", "\t" };
     while (!reader.EndOfStream)
     {
         string str = reader.ReadLine().Trim();
         if (str != "")
         {
             string[] tmpLine = str.Split(separator, StringSplitOptions.RemoveEmptyEntries);
             GeoProjFileSystem geoProjSystem = new GeoProjFileSystem();
             this.InitParams(geoProjSystem, tmpLine);
             this.SetProjectionParams(geoProjSystem, tmpLine);
             this.m_GeoProjFileSystemList.Add(geoProjSystem);
         }
     }
     reader.Close();
     return true;
 }
Esempio n. 9
0
 private void InitParams(GeoProjFileSystem geoProjSystem, string[] tmpLine)
 {
     try
     {
         geoProjSystem.SystemID = int.Parse(tmpLine[0]);
         geoProjSystem.SystemName = tmpLine[1];
         geoProjSystem.ProjectionName = tmpLine[2];
         geoProjSystem.Spheriod = tmpLine[3];
         geoProjSystem.CurrentProjParamType = (ProjParamType) int.Parse(tmpLine[4]);
     }
     catch
     {
         throw new Exception("GeoProjFileSystem Reading error");
     }
 }
Esempio n. 10
0
 public GeoConeParamsProperty(GeoProjFileSystem newProj) : base(newProj)
 {
 }