Updated GeoApi projections

This commit is contained in:
ClemensFischer 2026-01-13 10:41:04 +01:00
parent 81a0aeabbc
commit d1706db78a
6 changed files with 51 additions and 64 deletions

View file

@ -1,4 +1,5 @@
using System; using ProjNet.CoordinateSystems;
using System;
namespace MapControl.Projections namespace MapControl.Projections
{ {
@ -27,18 +28,18 @@ namespace MapControl.Projections
+ "GEOGCS[\"ED50\"," + "GEOGCS[\"ED50\","
+ "DATUM[\"European_Datum_1950\"," + "DATUM[\"European_Datum_1950\","
+ "SPHEROID[\"International 1924\",6378388,297],TOWGS84[-87,-98,-121,0,0,0,0]]," + "SPHEROID[\"International 1924\",6378388,297],TOWGS84[-87,-98,-121,0,0,0,0]],"
+ "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," + GeoApiProjectionFactory.PrimeMeridian + ","
+ "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]," + GeoApiProjectionFactory.UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4230\"]]," + "AUTHORITY[\"EPSG\",\"4230\"]],"
+ "PROJECTION[\"Transverse_Mercator\"]," + GeoApiProjectionFactory.ProjectionTM + ","
+ "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"latitude_of_origin\",0],"
+ $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}],"
+ "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"scale_factor\",0.9996],"
+ "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_easting\",500000],"
+ "PARAMETER[\"false_northing\",0]," + "PARAMETER[\"false_northing\",0],"
+ "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," + GeoApiProjectionFactory.UnitMeter + ","
+ "AXIS[\"Easting\",EAST]," + GeoApiProjectionFactory.AxisEast + ","
+ "AXIS[\"Northing\",NORTH]," + GeoApiProjectionFactory.AxisNorth + ","
+ $"AUTHORITY[\"EPSG\",\"230{zone:00}\"]]"; + $"AUTHORITY[\"EPSG\",\"230{zone:00}\"]]";
} }
} }

View file

@ -1,4 +1,5 @@
using System; using ProjNet.CoordinateSystems;
using System;
namespace MapControl.Projections namespace MapControl.Projections
{ {
@ -24,21 +25,16 @@ namespace MapControl.Projections
Zone = zone; Zone = zone;
CoordinateSystemWkt CoordinateSystemWkt
= $"PROJCS[\"ETRS89 / UTM zone {zone}N\"," = $"PROJCS[\"ETRS89 / UTM zone {zone}N\","
+ "GEOGCS[\"ETRS89\"," + GeoApiProjectionFactory.GeoGcsETRS89 + ","
+ "DATUM[\"European_Terrestrial_Reference_System_1989\"," + GeoApiProjectionFactory.ProjectionTM + ","
+ "SPHEROID[\"GRS 1980\",6378137,298.257222101]],"
+ "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],"
+ "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],"
+ "AUTHORITY[\"EPSG\",\"4258\"]],"
+ "PROJECTION[\"Transverse_Mercator\"],"
+ "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"latitude_of_origin\",0],"
+ $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}],"
+ "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"scale_factor\",0.9996],"
+ "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_easting\",500000],"
+ "PARAMETER[\"false_northing\",0]," + "PARAMETER[\"false_northing\",0],"
+ "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," + GeoApiProjectionFactory.UnitMeter + ","
+ "AXIS[\"Easting\",EAST]," + GeoApiProjectionFactory.AxisEast + ","
+ "AXIS[\"Northing\",NORTH]," + GeoApiProjectionFactory.AxisNorth + ","
+ $"AUTHORITY[\"EPSG\",\"258{zone:00}\"]]"; + $"AUTHORITY[\"EPSG\",\"258{zone:00}\"]]";
} }
} }

View file

@ -4,35 +4,33 @@ namespace MapControl.Projections
{ {
public class GeoApiProjectionFactory : MapProjectionFactory public class GeoApiProjectionFactory : MapProjectionFactory
{ {
private const string SpheroidGRS1980 = "SPHEROID[\"GRS 1980\",6378137,298.257222101]"; internal const string SpheroidGRS1980 = "SPHEROID[\"GRS 1980\",6378137,298.257222101]";
private const string SpheroidGRS1967Modified = "SPHEROID[\"GRS 1967 Modified\",6378160,298.25]"; internal const string SpheroidGRS1967Modified = "SPHEROID[\"GRS 1967 Modified\",6378160,298.25]";
private const string PrimeMeridian = "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]"; internal const string PrimeMeridian = "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]";
private const string UnitDegree = "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]"; internal const string UnitDegree = "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]";
private const string UnitMeter = "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]"; internal const string UnitMeter = "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]";
private const string ProjectionTM = "PROJECTION[\"Transverse_Mercator\"]"; internal const string ProjectionTM = "PROJECTION[\"Transverse_Mercator\"]";
private const string ProjectionLCC = "PROJECTION[\"Lambert_Conformal_Conic_2SP\"]"; internal const string ProjectionLCC = "PROJECTION[\"Lambert_Conformal_Conic_2SP\"]";
private const string AxisEast = "AXIS[\"Easting\",EAST]"; internal const string AxisEast = "AXIS[\"Easting\",EAST]";
private const string AxisNorth = "AXIS[\"Northing\",NORTH]"; internal const string AxisNorth = "AXIS[\"Northing\",NORTH]";
private const string GeoGcsETRS89 internal const string GeoGcsETRS89
= "GEOGCS[\"ETRS89\"," = "GEOGCS[\"ETRS89\","
+ "DATUM[\"European_Terrestrial_Reference_System_1989\"," + "DATUM[\"European_Terrestrial_Reference_System_1989\","
+ SpheroidGRS1980 + "," + SpheroidGRS1980 + "],"
+ "AUTHORITY[\"EPSG\",\"6258\"]],"
+ PrimeMeridian + "," + PrimeMeridian + ","
+ UnitDegree + "," + UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4258\"]]"; + "AUTHORITY[\"EPSG\",\"4258\"]]";
private const string GeoGcsGGRS87 internal const string GeoGcsGGRS87
= "GEOGCS[\"GGRS87\"," = "GEOGCS[\"GGRS87\","
+ "DATUM[\"Greek_Geodetic_Reference_System_1987\"," + "DATUM[\"Greek_Geodetic_Reference_System_1987\","
+ SpheroidGRS1980 + "," + SpheroidGRS1980 + ",TOWGS84[-199.87,74.79,246.62,0,0,0,0]],"
+ "TOWGS84[-199.87,74.79,246.62,0,0,0,0]],"
+ PrimeMeridian + "," + PrimeMeridian + ","
+ UnitDegree + "," + UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4121\"]]"; + "AUTHORITY[\"EPSG\",\"4121\"]]";
private const string GeoGcsETRF2000PL internal const string GeoGcsETRF2000PL
= "GEOGCS[\"ETRF2000-PL\"," = "GEOGCS[\"ETRF2000-PL\","
+ "DATUM[\"ETRF2000_Poland\"," + "DATUM[\"ETRF2000_Poland\","
+ SpheroidGRS1980 + "]," + SpheroidGRS1980 + "],"
@ -40,20 +38,18 @@ namespace MapControl.Projections
+ UnitDegree + "," + UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"9702\"]]"; + "AUTHORITY[\"EPSG\",\"9702\"]]";
private const string GeoGcsSAD69A internal const string GeoGcsSAD69A
= "GEOGCS[\"SAD69\"," = "GEOGCS[\"SAD69\","
+ "DATUM[\"South_American_Datum_1969\"," + "DATUM[\"South_American_Datum_1969\","
+ SpheroidGRS1967Modified + "," + SpheroidGRS1967Modified + ",TOWGS84[-57,1,-41,0,0,0,0]],"
+ "TOWGS84[-57,1,-41,0,0,0,0]],"
+ PrimeMeridian + "," + PrimeMeridian + ","
+ UnitDegree + "," + UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4618\"]]"; + "AUTHORITY[\"EPSG\",\"4618\"]]";
private const string GeoGcsSAD69B internal const string GeoGcsSAD69B
= "GEOGCS[\"SAD69\"," = "GEOGCS[\"SAD69\","
+ "DATUM[\"South_American_Datum_1969\"," + "DATUM[\"South_American_Datum_1969\","
+ SpheroidGRS1967Modified + "," + SpheroidGRS1967Modified + ",TOWGS84[-67.35,3.88,-38.22,0,0,0,0]],"
+ "TOWGS84[-67.35,3.88,-38.22,0,0,0,0]],"
+ PrimeMeridian + "," + PrimeMeridian + ","
+ UnitDegree + "," + UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4618\"]]"; + "AUTHORITY[\"EPSG\",\"4618\"]]";

View file

@ -27,18 +27,18 @@ namespace MapControl.Projections
+ "GEOGCS[\"NAD27\"," + "GEOGCS[\"NAD27\","
+ "DATUM[\"North_American_Datum_1927\"," + "DATUM[\"North_American_Datum_1927\","
+ "SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898]]," + "SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898]],"
+ "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," + GeoApiProjectionFactory.PrimeMeridian + ","
+ "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]," + GeoApiProjectionFactory.UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4267\"]]," + "AUTHORITY[\"EPSG\",\"4267\"]],"
+ "PROJECTION[\"Transverse_Mercator\"]," + GeoApiProjectionFactory.ProjectionTM + ","
+ "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"latitude_of_origin\",0],"
+ $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}],"
+ "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"scale_factor\",0.9996],"
+ "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_easting\",500000],"
+ "PARAMETER[\"false_northing\",0]," + "PARAMETER[\"false_northing\",0],"
+ "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," + GeoApiProjectionFactory.UnitMeter + ","
+ "AXIS[\"Easting\",EAST]," + GeoApiProjectionFactory.AxisEast + ","
+ "AXIS[\"Northing\",NORTH]," + GeoApiProjectionFactory.AxisNorth + ","
+ $"AUTHORITY[\"EPSG\",\"267{zone:00}\"]]"; + $"AUTHORITY[\"EPSG\",\"267{zone:00}\"]]";
} }
} }

View file

@ -27,18 +27,18 @@ namespace MapControl.Projections
+ "GEOGCS[\"NAD83\"," + "GEOGCS[\"NAD83\","
+ "DATUM[\"North_American_Datum_1983\"," + "DATUM[\"North_American_Datum_1983\","
+ "SPHEROID[\"GRS 1980\",6378137,298.257222101]]," + "SPHEROID[\"GRS 1980\",6378137,298.257222101]],"
+ "PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," + GeoApiProjectionFactory.PrimeMeridian + ","
+ "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]," + GeoApiProjectionFactory.UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"4269\"]]," + "AUTHORITY[\"EPSG\",\"4269\"]],"
+ "PROJECTION[\"Transverse_Mercator\"]," + GeoApiProjectionFactory.ProjectionTM + ","
+ "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"latitude_of_origin\",0],"
+ $"PARAMETER[\"central_meridian\",{6 * zone - 183}]," + $"PARAMETER[\"central_meridian\",{6 * zone - 183}],"
+ "PARAMETER[\"scale_factor\",0.9996]," + "PARAMETER[\"scale_factor\",0.9996],"
+ "PARAMETER[\"false_easting\",500000]," + "PARAMETER[\"false_easting\",500000],"
+ "PARAMETER[\"false_northing\",0]," + "PARAMETER[\"false_northing\",0],"
+ "UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," + GeoApiProjectionFactory.UnitMeter + ","
+ "AXIS[\"Easting\",EAST]," + GeoApiProjectionFactory.AxisEast + ","
+ "AXIS[\"Northing\",NORTH]," + GeoApiProjectionFactory.AxisNorth + ","
+ $"AUTHORITY[\"EPSG\",\"269{zone:00}\"]]"; + $"AUTHORITY[\"EPSG\",\"269{zone:00}\"]]";
} }
} }

View file

@ -18,14 +18,9 @@ namespace MapControl.Projections
CoordinateSystemWkt CoordinateSystemWkt
= "PROJCS[\"WGS 84 / World Mercator\"," = "PROJCS[\"WGS 84 / World Mercator\","
+ "GEOGCS[\"WGS 84\"," + "GEOGCS[\"WGS 84\","
+ "DATUM[\"WGS_1984\"," + "DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563]],"
+ "SPHEROID[\"WGS 84\",6378137,298.257223563," + GeoApiProjectionFactory.PrimeMeridian + ","
+ "AUTHORITY[\"EPSG\",\"7030\"]]," + GeoApiProjectionFactory.UnitDegree + ","
+ "AUTHORITY[\"EPSG\",\"6326\"]],"
+ "PRIMEM[\"Greenwich\",0,"
+ "AUTHORITY[\"EPSG\",\"8901\"]],"
+ "UNIT[\"degree\",0.0174532925199433,"
+ "AUTHORITY[\"EPSG\",\"9122\"]],"
+ "AUTHORITY[\"EPSG\",\"4326\"]]," + "AUTHORITY[\"EPSG\",\"4326\"]],"
+ "PROJECTION[\"Mercator_1SP\"]," + "PROJECTION[\"Mercator_1SP\"],"
+ "PARAMETER[\"latitude_of_origin\",0]," + "PARAMETER[\"latitude_of_origin\",0],"
@ -33,10 +28,9 @@ namespace MapControl.Projections
+ "PARAMETER[\"scale_factor\",1]," + "PARAMETER[\"scale_factor\",1],"
+ "PARAMETER[\"false_easting\",0]," + "PARAMETER[\"false_easting\",0],"
+ "PARAMETER[\"false_northing\",0]," + "PARAMETER[\"false_northing\",0],"
+ "UNIT[\"metre\",1," + GeoApiProjectionFactory.UnitMeter + ","
+ "AUTHORITY[\"EPSG\",\"9001\"]]," + GeoApiProjectionFactory.AxisEast + ","
+ "AXIS[\"Easting\",EAST]," + GeoApiProjectionFactory.AxisNorth + ","
+ "AXIS[\"Northing\",NORTH],"
+ "AUTHORITY[\"EPSG\",\"3395\"]]"; + "AUTHORITY[\"EPSG\",\"3395\"]]";
} }