From da3a9a18fb3f932db2227a2e9ee1f2f266c8f816 Mon Sep 17 00:00:00 2001 From: ClemensFischer Date: Tue, 13 Jan 2026 19:23:41 +0100 Subject: [PATCH] Updated GeoApiProjectionFactory --- MapProjections/Shared/Ed50UtmProjection.cs | 8 +- MapProjections/Shared/Etrs89UtmProjection.cs | 8 +- .../Shared/GeoApiProjectionFactory.cs | 136 +++++++++--------- MapProjections/Shared/Nad27UtmProjection.cs | 8 +- MapProjections/Shared/Nad83UtmProjection.cs | 8 +- .../Shared/WorldMercatorProjection.cs | 6 +- 6 files changed, 87 insertions(+), 87 deletions(-) diff --git a/MapProjections/Shared/Ed50UtmProjection.cs b/MapProjections/Shared/Ed50UtmProjection.cs index dbb1a44e..438b024f 100644 --- a/MapProjections/Shared/Ed50UtmProjection.cs +++ b/MapProjections/Shared/Ed50UtmProjection.cs @@ -27,18 +27,18 @@ namespace MapControl.Projections + "GEOGCS[\"ED50\"," + "DATUM[\"European_Datum_1950\"," + "SPHEROID[\"International 1924\",6378388,297],TOWGS84[-87,-98,-121,0,0,0,0]]," - + GeoApiProjectionFactory.PrimeMeridian + "," + + GeoApiProjectionFactory.PrimeMeridianGreenwich + "," + GeoApiProjectionFactory.UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4230\"]]," - + GeoApiProjectionFactory.ProjectionTM + "," + + GeoApiProjectionFactory.ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",0]," + GeoApiProjectionFactory.UnitMeter + "," - + GeoApiProjectionFactory.AxisEast + "," - + GeoApiProjectionFactory.AxisNorth + "," + + GeoApiProjectionFactory.AxisEasting + "," + + GeoApiProjectionFactory.AxisNorthing + "," + $"AUTHORITY[\"EPSG\",\"230{zone:00}\"]]"; } } diff --git a/MapProjections/Shared/Etrs89UtmProjection.cs b/MapProjections/Shared/Etrs89UtmProjection.cs index 34025dfd..ab1abd8a 100644 --- a/MapProjections/Shared/Etrs89UtmProjection.cs +++ b/MapProjections/Shared/Etrs89UtmProjection.cs @@ -24,16 +24,16 @@ namespace MapControl.Projections Zone = zone; CoordinateSystemWkt = $"PROJCS[\"ETRS89 / UTM zone {zone}N\"," - + GeoApiProjectionFactory.GeoGcsETRS89 + "," - + GeoApiProjectionFactory.ProjectionTM + "," + + GeoApiProjectionFactory.GeoGcsEtrs89 + "," + + GeoApiProjectionFactory.ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",0]," + GeoApiProjectionFactory.UnitMeter + "," - + GeoApiProjectionFactory.AxisEast + "," - + GeoApiProjectionFactory.AxisNorth + "," + + GeoApiProjectionFactory.AxisEasting + "," + + GeoApiProjectionFactory.AxisNorthing + "," + $"AUTHORITY[\"EPSG\",\"258{zone:00}\"]]"; } } diff --git a/MapProjections/Shared/GeoApiProjectionFactory.cs b/MapProjections/Shared/GeoApiProjectionFactory.cs index b34af372..a9ce9c26 100644 --- a/MapProjections/Shared/GeoApiProjectionFactory.cs +++ b/MapProjections/Shared/GeoApiProjectionFactory.cs @@ -4,53 +4,53 @@ namespace MapControl.Projections { public class GeoApiProjectionFactory : MapProjectionFactory { - internal const string SpheroidGRS1980 = "SPHEROID[\"GRS 1980\",6378137,298.257222101]"; - internal const string SpheroidGRS1967Modified = "SPHEROID[\"GRS 1967 Modified\",6378160,298.25]"; - internal const string PrimeMeridian = "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]"; + internal const string SpheroidGrs1980 = "SPHEROID[\"GRS 1980\",6378137,298.257222101]"; + internal const string SpheroidGrs1967Modified = "SPHEROID[\"GRS 1967 Modified\",6378160,298.25]"; + internal const string PrimeMeridianGreenwich = "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]"; internal const string UnitDegree = "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]"; internal const string UnitMeter = "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]"; - internal const string ProjectionTM = "PROJECTION[\"Transverse_Mercator\"]"; - internal const string ProjectionLCC = "PROJECTION[\"Lambert_Conformal_Conic_2SP\"]"; - internal const string AxisEast = "AXIS[\"Easting\",EAST]"; - internal const string AxisNorth = "AXIS[\"Northing\",NORTH]"; + internal const string ProjectionTransverseMercator = "PROJECTION[\"Transverse_Mercator\"]"; + internal const string ProjectionLambertConformalConic = "PROJECTION[\"Lambert_Conformal_Conic_2SP\"]"; + internal const string AxisEasting = "AXIS[\"Easting\",EAST]"; + internal const string AxisNorthing = "AXIS[\"Northing\",NORTH]"; - internal const string GeoGcsETRS89 + internal const string GeoGcsEtrs89 = "GEOGCS[\"ETRS89\"," + "DATUM[\"European_Terrestrial_Reference_System_1989\"," - + SpheroidGRS1980 + "]," - + PrimeMeridian + "," + + SpheroidGrs1980 + "]," + + PrimeMeridianGreenwich + "," + UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4258\"]]"; - internal const string GeoGcsGGRS87 + internal const string GeoGcsGgrs87 = "GEOGCS[\"GGRS87\"," + "DATUM[\"Greek_Geodetic_Reference_System_1987\"," - + SpheroidGRS1980 + ",TOWGS84[-199.87,74.79,246.62,0,0,0,0]]," - + PrimeMeridian + "," + + SpheroidGrs1980 + ",TOWGS84[-199.87,74.79,246.62,0,0,0,0]]," + + PrimeMeridianGreenwich + "," + UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4121\"]]"; - internal const string GeoGcsETRF2000PL + internal const string GeoGcsEtrf2000Pl = "GEOGCS[\"ETRF2000-PL\"," + "DATUM[\"ETRF2000_Poland\"," - + SpheroidGRS1980 + "]," - + PrimeMeridian + "," + + SpheroidGrs1980 + "]," + + PrimeMeridianGreenwich + "," + UnitDegree + "," + "AUTHORITY[\"EPSG\",\"9702\"]]"; - internal const string GeoGcsSAD69A + internal const string GeoGcsSad69A = "GEOGCS[\"SAD69\"," + "DATUM[\"South_American_Datum_1969\"," - + SpheroidGRS1967Modified + ",TOWGS84[-57,1,-41,0,0,0,0]]," - + PrimeMeridian + "," + + SpheroidGrs1967Modified + ",TOWGS84[-57,1,-41,0,0,0,0]]," + + PrimeMeridianGreenwich + "," + UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4618\"]]"; - internal const string GeoGcsSAD69B + internal const string GeoGcsSad69B = "GEOGCS[\"SAD69\"," + "DATUM[\"South_American_Datum_1969\"," - + SpheroidGRS1967Modified + ",TOWGS84[-67.35,3.88,-38.22,0,0,0,0]]," - + PrimeMeridian + "," + + SpheroidGrs1967Modified + ",TOWGS84[-67.35,3.88,-38.22,0,0,0,0]]," + + PrimeMeridianGreenwich + "," + UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4618\"]]"; @@ -58,22 +58,22 @@ namespace MapControl.Projections { { 2100, "PROJCS[\"GGRS87 / Greek Grid\"," - + GeoGcsGGRS87 + "," - + ProjectionTM + "," + + GeoGcsGgrs87 + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",24]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",0]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"2100\"]]" }, { 2180, "PROJCS[\"ETRF2000-PL / CS92\"," - + GeoGcsETRF2000PL + "," - + ProjectionTM + "," + + GeoGcsEtrf2000Pl + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",19]," + "PARAMETER[\"scale_factor\",0.9993]," @@ -84,120 +84,120 @@ namespace MapControl.Projections }, { 4647, "PROJCS[\"ETRS89 / UTM zone 32N (zE-N)\"," - + GeoGcsETRS89 + "," - + ProjectionTM + "," + + GeoGcsEtrs89 + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",9]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",32500000]," + "PARAMETER[\"false_northing\",0]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"4647\"]]" }, { 29187, "PROJCS[\"SAD69 / UTM zone 17S\"," - + GeoGcsSAD69A + "," - + ProjectionTM + "," + + GeoGcsSad69A + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-81]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29187\"]]" }, { 29188, "PROJCS[\"SAD69 / UTM zone 18S\"," - + GeoGcsSAD69A + "," - + ProjectionTM + "," + + GeoGcsSad69A + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-75]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29188\"]]" }, { 29189, "PROJCS[\"SAD69 / UTM zone 19S\"," - + GeoGcsSAD69A + "," - + ProjectionTM + "," + + GeoGcsSad69A + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-69]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29189\"]]" }, { 29190, "PROJCS[\"SAD69 / UTM zone 20S\"," - + GeoGcsSAD69A + "," - + ProjectionTM + "," + + GeoGcsSad69A + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-63]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29190\"]]" }, { 29191, "PROJCS[\"SAD69 / UTM zone 21S\"," - + GeoGcsSAD69A + "," - + ProjectionTM + "," + + GeoGcsSad69A + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-57]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29191\"]]" }, { 29192, "PROJCS[\"SAD69 / UTM zone 22S\"," - + GeoGcsSAD69B + "," - + ProjectionTM + "," + + GeoGcsSad69B + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-51]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29192\"]]" }, { 29193, "PROJCS[\"SAD69 / UTM zone 23S\"," - + GeoGcsSAD69B + "," - + ProjectionTM + "," + + GeoGcsSad69B + "," + + ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"central_meridian\",-45]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",10000000]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"29193\"]]" }, { 3034, "PROJCS[\"ETRS89-extended / LCC Europe\"," - + GeoGcsETRS89 + "," - + ProjectionLCC + "," + + GeoGcsEtrs89 + "," + + ProjectionLambertConformalConic + "," + "PARAMETER[\"latitude_of_origin\",52]," + "PARAMETER[\"central_meridian\",10]," + "PARAMETER[\"standard_parallel_1\",35]," @@ -209,8 +209,8 @@ namespace MapControl.Projections }, { 4839, "PROJCS[\"ETRS89 / LCC Germany (N-E)\"," - + GeoGcsETRS89 + "," - + ProjectionLCC + "," + + GeoGcsEtrs89 + "," + + ProjectionLambertConformalConic + "," + "PARAMETER[\"latitude_of_origin\",51]," + "PARAMETER[\"central_meridian\",10.5]," + "PARAMETER[\"standard_parallel_1\",48.6666666666667]," @@ -222,8 +222,8 @@ namespace MapControl.Projections }, { 5243, "PROJCS[\"ETRS89 / LCC Germany (E-N)\"," - + GeoGcsETRS89 + "," - + ProjectionLCC + "," + + GeoGcsEtrs89 + "," + + ProjectionLambertConformalConic + "," + "PARAMETER[\"latitude_of_origin\",51]," + "PARAMETER[\"central_meridian\",10.5]," + "PARAMETER[\"standard_parallel_1\",48.6666666666667]," @@ -231,8 +231,8 @@ namespace MapControl.Projections + "PARAMETER[\"false_easting\",0]," + "PARAMETER[\"false_northing\",0]," + UnitMeter + "," - + AxisEast + "," - + AxisNorth + "," + + AxisEasting + "," + + AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"5243\"]]" } }; diff --git a/MapProjections/Shared/Nad27UtmProjection.cs b/MapProjections/Shared/Nad27UtmProjection.cs index 47e60308..a1802dd7 100644 --- a/MapProjections/Shared/Nad27UtmProjection.cs +++ b/MapProjections/Shared/Nad27UtmProjection.cs @@ -27,18 +27,18 @@ namespace MapControl.Projections + "GEOGCS[\"NAD27\"," + "DATUM[\"North_American_Datum_1927\"," + "SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898]]," - + GeoApiProjectionFactory.PrimeMeridian + "," + + GeoApiProjectionFactory.PrimeMeridianGreenwich + "," + GeoApiProjectionFactory.UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4267\"]]," - + GeoApiProjectionFactory.ProjectionTM + "," + + GeoApiProjectionFactory.ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",0]," + GeoApiProjectionFactory.UnitMeter + "," - + GeoApiProjectionFactory.AxisEast + "," - + GeoApiProjectionFactory.AxisNorth + "," + + GeoApiProjectionFactory.AxisEasting + "," + + GeoApiProjectionFactory.AxisNorthing + "," + $"AUTHORITY[\"EPSG\",\"267{zone:00}\"]]"; } } diff --git a/MapProjections/Shared/Nad83UtmProjection.cs b/MapProjections/Shared/Nad83UtmProjection.cs index 47ea5260..717cc30a 100644 --- a/MapProjections/Shared/Nad83UtmProjection.cs +++ b/MapProjections/Shared/Nad83UtmProjection.cs @@ -27,18 +27,18 @@ namespace MapControl.Projections + "GEOGCS[\"NAD83\"," + "DATUM[\"North_American_Datum_1983\"," + "SPHEROID[\"GRS 1980\",6378137,298.257222101]]," - + GeoApiProjectionFactory.PrimeMeridian + "," + + GeoApiProjectionFactory.PrimeMeridianGreenwich + "," + GeoApiProjectionFactory.UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4269\"]]," - + GeoApiProjectionFactory.ProjectionTM + "," + + GeoApiProjectionFactory.ProjectionTransverseMercator + "," + "PARAMETER[\"latitude_of_origin\",0]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_northing\",0]," + GeoApiProjectionFactory.UnitMeter + "," - + GeoApiProjectionFactory.AxisEast + "," - + GeoApiProjectionFactory.AxisNorth + "," + + GeoApiProjectionFactory.AxisEasting + "," + + GeoApiProjectionFactory.AxisNorthing + "," + $"AUTHORITY[\"EPSG\",\"269{zone:00}\"]]"; } } diff --git a/MapProjections/Shared/WorldMercatorProjection.cs b/MapProjections/Shared/WorldMercatorProjection.cs index ebc06711..adefbc46 100644 --- a/MapProjections/Shared/WorldMercatorProjection.cs +++ b/MapProjections/Shared/WorldMercatorProjection.cs @@ -19,7 +19,7 @@ namespace MapControl.Projections = "PROJCS[\"WGS 84 / World Mercator\"," + "GEOGCS[\"WGS 84\"," + "DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]]," - + GeoApiProjectionFactory.PrimeMeridian + "," + + GeoApiProjectionFactory.PrimeMeridianGreenwich + "," + GeoApiProjectionFactory.UnitDegree + "," + "AUTHORITY[\"EPSG\",\"4326\"]]," + "PROJECTION[\"Mercator_1SP\"]," @@ -29,8 +29,8 @@ namespace MapControl.Projections + "PARAMETER[\"false_easting\",0]," + "PARAMETER[\"false_northing\",0]," + GeoApiProjectionFactory.UnitMeter + "," - + GeoApiProjectionFactory.AxisEast + "," - + GeoApiProjectionFactory.AxisNorth + "," + + GeoApiProjectionFactory.AxisEasting + "," + + GeoApiProjectionFactory.AxisNorthing + "," + "AUTHORITY[\"EPSG\",\"3395\"]]"; }