mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +00:00
Added orthographic and stereographic projections
This commit is contained in:
parent
d825b50062
commit
ae1a77679c
10 changed files with 457 additions and 371 deletions
36
MapProjections/Shared/Wgs84OrthographicProjection.cs
Normal file
36
MapProjections/Shared/Wgs84OrthographicProjection.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
using System.Globalization;
|
||||
|
||||
namespace MapControl.Projections
|
||||
{
|
||||
public class Wgs84OrthographicProjection : ProjNetMapProjection
|
||||
{
|
||||
public Wgs84OrthographicProjection()
|
||||
{
|
||||
Center = base.Center;
|
||||
}
|
||||
|
||||
public override Location Center
|
||||
{
|
||||
get => base.Center;
|
||||
protected set
|
||||
{
|
||||
base.Center = value;
|
||||
|
||||
var wktFormat =
|
||||
"PROJCS[\"WGS 84 / World Mercator\"," +
|
||||
WktConstants.GeogCsWgs84 + "," +
|
||||
"PROJECTION[\"Orthographic\"]," +
|
||||
"PARAMETER[\"latitude_of_origin\",{0:0.########}]," +
|
||||
"PARAMETER[\"central_meridian\",{1:0.########}]," +
|
||||
"UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]," +
|
||||
"AXIS[\"Easting\",EAST]," +
|
||||
"AXIS[\"Northing\",NORTH]" +
|
||||
"AUTHORITY[\"AUTO2\",\"42003\"]]";
|
||||
|
||||
CoordinateSystemWkt = string.Format(
|
||||
CultureInfo.InvariantCulture, wktFormat, value.Latitude, value.Longitude);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue