XAML-Map-Control/MapProjections/Shared/Wgs84UpsProjections.cs

53 lines
2 KiB
C#
Raw Normal View History

2026-01-15 11:04:11 +01:00
#if WPF
using System.Windows.Media;
2026-01-15 11:04:11 +01:00
#endif
namespace MapControl.Projections
{
public class Wgs84UpsNorthProjection : ProjNetMapProjection
{
public Wgs84UpsNorthProjection()
{
CoordinateSystemWkt =
"PROJCS[\"WGS 84 / UPS North (N,E)\"," +
WktConstants.GeogCsWgs84 + "," +
"PROJECTION[\"Polar_Stereographic\"]," +
"PARAMETER[\"latitude_of_origin\",90]," +
"PARAMETER[\"central_meridian\",0]," +
"PARAMETER[\"scale_factor\",0.994]," +
"PARAMETER[\"false_easting\",2000000]," +
"PARAMETER[\"false_northing\",2000000]," +
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," +
"AUTHORITY[\"EPSG\",\"32661\"]]";
2026-01-15 11:04:11 +01:00
}
2026-01-27 22:56:09 +01:00
public override Matrix RelativeTransform(double latitude, double longitude)
2026-01-15 11:04:11 +01:00
{
return PolarStereographicProjection.RelativeScale(Hemisphere.North, Wgs84Flattening, 0.994, latitude, longitude);
2026-01-15 11:04:11 +01:00
}
}
public class Wgs84UpsSouthProjection : ProjNetMapProjection
{
public Wgs84UpsSouthProjection()
{
CoordinateSystemWkt =
"PROJCS[\"WGS 84 / UPS South (N,E)\"," +
WktConstants.GeogCsWgs84 + "," +
"PROJECTION[\"Polar_Stereographic\"]," +
"PARAMETER[\"latitude_of_origin\",-90]," +
"PARAMETER[\"central_meridian\",0]," +
"PARAMETER[\"scale_factor\",0.994]," +
"PARAMETER[\"false_easting\",2000000]," +
"PARAMETER[\"false_northing\",2000000]," +
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," +
"AUTHORITY[\"EPSG\",\"32761\"]]";
2026-01-15 11:04:11 +01:00
}
2026-01-27 22:56:09 +01:00
public override Matrix RelativeTransform(double latitude, double longitude)
2026-01-15 11:04:11 +01:00
{
return PolarStereographicProjection.RelativeScale(Hemisphere.North, Wgs84Flattening, 0.994, latitude, longitude);
2026-01-15 11:04:11 +01:00
}
}
}