예제 #1
0
 public void ProjectionChange(ProjParamType type, string name, IGeoProjection proj)
 {
     if (this.ProjectionChangeEvent != null)
     {
         this.ProjectionChangeEvent(type, name, proj);
     }
 }
예제 #2
0
 public GeoProjFileSystem()
 {
     this.m_SystemName = "NewSystem";
     this.m_SystemID = -1;
     this.m_Spheriod = string.Empty;
     this.m_ProjectionName = string.Empty;
     this.m_FilePath = string.Empty;
     this.m_GaussProjParams = new GaussProjectionParams();
     this.m_DistortionProjParams = new DistortionProjectionParams();
     this.m_ConeProjParams = new ConeProjectionParams();
     this.m_CurrentProjParamType = ProjParamType.NULL;
     this.m_GeoProjFileSystemList = new List<GeoProjFileSystem>();
     this.m_SetProjectionParamsDict = new Dictionary<ProjParamType, SetProjectionParam>();
     this.m_SetProjectionParamsDict.Add(ProjParamType.GaussProjParam, new SetProjectionParam(this.SetGaussProjectionParams));
     this.m_SetProjectionParamsDict.Add(ProjParamType.DistortionProjParam, new SetProjectionParam(this.SetDistortionProjectionParams));
     this.m_SetProjectionParamsDict.Add(ProjParamType.ConeProjParam, new SetProjectionParam(this.SetConeProjectionParams));
     this.InitProjectionDict();
 }
예제 #3
0
        public GeoProjFileSystem(string name, string proj, string spheriod, double para1, double para2, double para3, double para4, double para5, double para6) : this()
        {
            this.m_CurrentProjParamType = this.GetCurrentProjParamType(proj);
            this.m_SystemName = name;
            this.m_Spheriod = spheriod;
            this.m_ProjectionName = proj;
            switch (this.m_CurrentProjParamType)
            {
                case ProjParamType.GaussProjParam:
                    this.m_GaussProjParams.name = proj;
                    this.m_GaussProjParams.latitudeOrigin = para1;
                    this.m_GaussProjParams.longitudeOrigin = para2;
                    this.m_GaussProjParams.yFalseNorth = para3;
                    this.m_GaussProjParams.xFalseNorth = para4;
                    break;

                case ProjParamType.DistortionProjParam:
                    this.m_DistortionProjParams.name = proj;
                    this.m_DistortionProjParams.latitudeOrigin = para1;
                    this.m_DistortionProjParams.longitudeOrigin = para2;
                    this.m_DistortionProjParams.yFalseNorth = para3;
                    this.m_DistortionProjParams.xFalseNorth = para4;
                    this.m_DistortionProjParams.azCentralLine = para5;
                    this.m_DistortionProjParams.rectifiedToSkew = para6;
                    break;

                case ProjParamType.ConeProjParam:
                    this.m_ConeProjParams.name = proj;
                    this.m_ConeProjParams.latitudeOrigin = para1;
                    this.m_ConeProjParams.longitudeOrigin = para2;
                    this.m_ConeProjParams.yFalseNorth = para3;
                    this.m_ConeProjParams.xFalseNorth = para4;
                    this.m_ConeProjParams.firstParallel = para5;
                    this.m_ConeProjParams.secondParallel = para6;
                    break;

                default:
                    this.m_GaussProjParams.name = "Gauss-kruger";
                    this.m_Spheriod = "Krasovsky1940";
                    break;
            }
        }
예제 #4
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;
     }
 }
예제 #5
0
        private void ChangeProjectionType(ProjParamType type, string projectionName)
        {
            this.m_PorjectionName = projectionName;
            switch (type)
            {
                case ProjParamType.GaussProjParam:
                    if (projectionName != null)
                    {
                        if (!(projectionName == "UTM"))
                        {
                            this.m_GaussProperty.NewProjetion.GaussProjParams.name = projectionName;
                            break;
                        }
                        this.m_UTMProperty.NewProjetion.GaussProjParams.name = projectionName;
                    }
                    break;

                case ProjParamType.DistortionProjParam:
                    this.m_DistProperty.NewProjetion.DistortionProjParams.name = projectionName;
                    this.propertyGrid1.SelectedObject = this.m_DistProperty;
                    this.m_Type = ProjParamType.DistortionProjParam;
                    return;

                case ProjParamType.ConeProjParam:
                    this.m_ConeProperty.NewProjetion.ConeProjParams.name = projectionName;
                    this.propertyGrid1.SelectedObject = this.m_ConeProperty;
                    this.m_Type = ProjParamType.ConeProjParam;
                    return;

                default:
                    this.propertyGrid1.SelectedObject = null;
                    return;
            }
            if (projectionName == "UTM")
            {
                this.propertyGrid1.SelectedObject = this.m_UTMProperty;
            }
            else
            {
                this.propertyGrid1.SelectedObject = this.m_GaussProperty;
            }
            this.m_Type = ProjParamType.GaussProjParam;
        }
예제 #6
0
        public bool ModSetProjection(string name, string project, string spheriod, double para1, double para2, double para3, double para4, double para5, double para6)
        {
            this.m_Type = this.m_GaussProperty.ModGetCurrentProjType(project);
            this.m_PorjectionName = project;
            foreach (string str in this.m_ProjectionNames)
            {
                if (str.Equals(name))
                {
                    return false;
                }
            }
            this.m_ProjectionSystem.SystemName = name;
            switch (this.m_Type)
            {
                case ProjParamType.GaussProjParam:
                    this.m_GaussProperty.ProjectionName = project;
                    this.m_GaussProperty.SpheroidName = spheriod;
                    this.m_GaussProperty.LatitudeOrigin = para1;
                    this.m_GaussProperty.LongitudeOrigin = para2;
                    this.m_GaussProperty.XFalseNorth = para3;
                    this.m_GaussProperty.YFalseNorth = para4;
                    break;

                case ProjParamType.DistortionProjParam:
                    this.m_DistProperty.ProjectionName = project;
                    this.m_DistProperty.SpheroidName = spheriod;
                    this.m_DistProperty.LatitudeOrigin = para1;
                    this.m_DistProperty.LongitudeOrigin = para2;
                    this.m_DistProperty.XFalseNorth = para3;
                    this.m_DistProperty.YFalseNorth = para4;
                    this.m_DistProperty.AzCentralLine = para5;
                    this.m_DistProperty.RectifiedToSkew = para6;
                    break;

                case ProjParamType.ConeProjParam:
                    this.m_ConeProperty.ProjectionName = project;
                    this.m_ConeProperty.SpheroidName = spheriod;
                    this.m_ConeProperty.LatitudeOrigin = para1;
                    this.m_ConeProperty.LongitudeOrigin = para2;
                    this.m_ConeProperty.XFalseNorth = para3;
                    this.m_ConeProperty.YFalseNorth = para4;
                    this.m_ConeProperty.FirstParallel = para5;
                    this.m_ConeProperty.SecondParallel = para6;
                    break;

                default:
                    this.m_GaussProperty.ProjectionName = "Gauss-kruger";
                    this.m_GaussProperty.SpheroidName = "Krasovsky1940";
                    break;
            }
            return true;
        }