Removed EPSG:4087 and AUTO2:42004

This commit is contained in:
ClemensFischer 2026-01-22 19:53:38 +01:00
parent d39c5a852e
commit 66231e6950
6 changed files with 7 additions and 72 deletions

View file

@ -1,52 +0,0 @@
using System;
#if WPF
using System.Windows;
using System.Windows.Media;
#elif AVALONIA
using Avalonia;
#endif
namespace MapControl
{
/// <summary>
/// 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.
/// </summary>
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);
}
}
}

View file

@ -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(),

View file

@ -1,7 +1,8 @@
namespace MapControl
{
/// <summary>
/// WGS84 Auto Transverse Mercator Projection.
/// WGS84 Auto Transverse Mercator Projection - AUTO2:42002.
/// The CentralMeridian is automatically set to the projection's Center.Longitude.
/// </summary>
public class Wgs84AutoTmProjection : TransverseMercatorProjection
{

View file

@ -3,9 +3,10 @@
namespace MapControl
{
/// <summary>
/// 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.
/// </summary>
public class Wgs84AutoUtmProjection : Wgs84UtmProjection
{

View file

@ -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 },

View file

@ -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 + "," +