mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +00:00
Unified map projections
This commit is contained in:
parent
a4bd11e26d
commit
9fe7dccd68
21 changed files with 370 additions and 377 deletions
|
|
@ -16,8 +16,6 @@ namespace MapControl
|
|||
{
|
||||
public const string DefaultCrsId = "EPSG:3395";
|
||||
|
||||
public double Flattening { get; set; } = Wgs84Flattening;
|
||||
|
||||
public WorldMercatorProjection() // parameterless constructor for XAML
|
||||
: this(DefaultCrsId)
|
||||
{
|
||||
|
|
@ -31,8 +29,8 @@ namespace MapControl
|
|||
|
||||
public override Matrix RelativeTransform(double latitude, double longitude)
|
||||
{
|
||||
var phi = latitude * Math.PI / 180d;
|
||||
var e2 = (2d - Flattening) * Flattening;
|
||||
var phi = latitude * Math.PI / 180d;
|
||||
var sinPhi = Math.Sin(phi);
|
||||
var k = Math.Sqrt(1d - e2 * sinPhi * sinPhi) / Math.Cos(phi); // p.44 (7-8)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue