diff --git a/MapControl/Shared/AutoEquirectangularProjection.cs b/MapControl/Shared/AutoEquirectangularProjection.cs deleted file mode 100644 index c075715d..00000000 --- a/MapControl/Shared/AutoEquirectangularProjection.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -#if WPF -using System.Windows; -using System.Windows.Media; -#elif AVALONIA -using Avalonia; -#endif - -namespace MapControl -{ - /// - /// Auto-Equirectangular Projection - AUTO2:42004. - /// Equidistant cylindrical projection with standard parallel and central meridian set by the Center property. - /// See "Map Projections - A Working Manual" (https://pubs.usgs.gov/publication/pp1395), p.90-91. - /// - public class AutoEquirectangularProjection : MapProjection - { - public const string DefaultCrsId = "AUTO2:42004"; - - public AutoEquirectangularProjection() // parameterless constructor for XAML - : this(DefaultCrsId) - { - } - - public AutoEquirectangularProjection(string crsId) - { - Type = MapProjectionType.NormalCylindrical; - CrsId = crsId; - } - - public override Matrix RelativeScale(double latitude, double longitude) - { - return new Matrix( - Math.Cos(Center.Latitude * Math.PI / 180d) / Math.Cos(latitude * Math.PI / 180d), - 0d, 0d, 1d, 0d, 0d); - } - - public override Point? LocationToMap(double latitude, double longitude) - { - return new Point( - Wgs84MeterPerDegree * (longitude - Center.Longitude) * Math.Cos(Center.Latitude * Math.PI / 180d), - Wgs84MeterPerDegree * latitude); - } - - public override Location MapToLocation(double x, double y) - { - return new Location( - y / Wgs84MeterPerDegree, - x / (Wgs84MeterPerDegree * Math.Cos(Center.Latitude * Math.PI / 180d)) + Center.Longitude); - } - } -} diff --git a/MapControl/Shared/MapProjectionFactory.cs b/MapControl/Shared/MapProjectionFactory.cs index db4214bd..8519f9af 100644 --- a/MapControl/Shared/MapProjectionFactory.cs +++ b/MapControl/Shared/MapProjectionFactory.cs @@ -10,13 +10,12 @@ namespace MapControl { WebMercatorProjection.DefaultCrsId => new WebMercatorProjection(), WorldMercatorProjection.DefaultCrsId => new WorldMercatorProjection(), - EquirectangularProjection.DefaultCrsId or "CRS:84" or "EPSG:4087" => new EquirectangularProjection(crsId), + EquirectangularProjection.DefaultCrsId or "CRS:84" => new EquirectangularProjection(crsId), Wgs84UpsNorthProjection.DefaultCrsId => new Wgs84UpsNorthProjection(), Wgs84UpsSouthProjection.DefaultCrsId => new Wgs84UpsSouthProjection(), Wgs84AutoUtmProjection.DefaultCrsId => new Wgs84AutoUtmProjection(), Wgs84AutoTmProjection.DefaultCrsId => new Wgs84AutoTmProjection(), OrthographicProjection.DefaultCrsId => new OrthographicProjection(), - AutoEquirectangularProjection.DefaultCrsId => new AutoEquirectangularProjection(), GnomonicProjection.DefaultCrsId => new GnomonicProjection(), StereographicProjection.DefaultCrsId => new StereographicProjection(), AzimuthalEquidistantProjection.DefaultCrsId => new AzimuthalEquidistantProjection(), diff --git a/MapControl/Shared/Wgs84AutoTmProjection.cs b/MapControl/Shared/Wgs84AutoTmProjection.cs index aa002149..8aa283e8 100644 --- a/MapControl/Shared/Wgs84AutoTmProjection.cs +++ b/MapControl/Shared/Wgs84AutoTmProjection.cs @@ -1,7 +1,8 @@ namespace MapControl { /// - /// WGS84 Auto Transverse Mercator Projection. + /// WGS84 Auto Transverse Mercator Projection - AUTO2:42002. + /// The CentralMeridian is automatically set to the projection's Center.Longitude. /// public class Wgs84AutoTmProjection : TransverseMercatorProjection { diff --git a/MapControl/Shared/Wgs84AutoUtmProjection.cs b/MapControl/Shared/Wgs84AutoUtmProjection.cs index cb0cb6e5..be711d5b 100644 --- a/MapControl/Shared/Wgs84AutoUtmProjection.cs +++ b/MapControl/Shared/Wgs84AutoUtmProjection.cs @@ -3,9 +3,10 @@ namespace MapControl { /// - /// WGS84 Universal Transverse Mercator Projection with automatic zone selection from - /// the projection center. If the CRS identifier passed to the constructor is null or empty, - /// appropriate values from EPSG:32601 to EPSG:32660 and EPSG:32701 to EPSG:32760 are used. + /// WGS84 Universal Transverse Mercator Projection - AUTO2:42002. + /// Zone and Hemisphere are automatically selected from the projection's Center. + /// If the CRS identifier passed to the constructor is null or empty, appropriate + /// values from EPSG:32601 to EPSG:32660 and EPSG:32701 to EPSG:32760 are used. /// public class Wgs84AutoUtmProjection : Wgs84UtmProjection { diff --git a/MapProjections/Shared/ProjNetMapProjectionFactory.cs b/MapProjections/Shared/ProjNetMapProjectionFactory.cs index 0c130b2d..0b03ffa5 100644 --- a/MapProjections/Shared/ProjNetMapProjectionFactory.cs +++ b/MapProjections/Shared/ProjNetMapProjectionFactory.cs @@ -11,7 +11,6 @@ namespace MapControl.Projections { 2180, WktConstants.ProjCsEtrf2000Pl }, { 3034, WktConstants.ProjCsEtrs89LccEurope }, { 3035, WktConstants.ProjCsEtrs89LaeaEurope }, - { 4087, WktConstants.ProjCsWgs84 }, { 4647, WktConstants.ProjCsEtrs89Utm32NzEN }, { 4839, WktConstants.ProjCsEtrs89LccGermanyNE }, { 5243, WktConstants.ProjCsEtrs89LccGermanyEN }, diff --git a/MapProjections/Shared/WktConstants.cs b/MapProjections/Shared/WktConstants.cs index e08a1f8d..e9fe9489 100644 --- a/MapProjections/Shared/WktConstants.cs +++ b/MapProjections/Shared/WktConstants.cs @@ -101,19 +101,6 @@ UnitDegree + "AUTHORITY[\"EPSG\",\"4149\"]]"; - public const string ProjCsWgs84 = - "PROJCS[\"WGS 84 / World Equidistant Cylindrical\"," + - GeogCsWgs84 + - "PROJECTION[\"Equirectangular\"]," + - "PARAMETER[\"standard_parallel_1\",0]," + - "PARAMETER[\"central_meridian\",0]," + - "PARAMETER[\"false_easting\",0]," + - "PARAMETER[\"false_northing\",0]," + - "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," + - "AXIS[\"Easting\",EAST]," + - "AXIS[\"Northing\",NORTH]," + - "AUTHORITY[\"EPSG\",\"4087\"]]"; - public const string ProjCsGgrs87 = "PROJCS[\"GGRS87 / Greek Grid\"," + GeogCsGgrs87 + "," +