mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-07 23:45:05 +00:00
Updated projections
This commit is contained in:
parent
da3a9a18fb
commit
91dfeee19c
6 changed files with 49 additions and 43 deletions
|
|
@ -96,16 +96,16 @@ namespace MapControl
|
|||
var t = r * Math.Sqrt(Math.Pow(1d + e, 1d + e) * Math.Pow(1d - e, 1d - e))
|
||||
/ (2d * EquatorialRadius * ScaleFactor); // p.162 (21-39)
|
||||
|
||||
var lat = WorldMercatorProjection.ApproximateLatitude(e, t); // p.162 (3-5)
|
||||
var lon = Math.Atan2(x, -y); // p.162 (20-16)
|
||||
var phi = WorldMercatorProjection.ApproximateLatitude(e, t); // p.162 (3-5)
|
||||
var lambda = Math.Atan2(x, -y); // p.162 (20-16)
|
||||
|
||||
if (Hemisphere == Hemisphere.South)
|
||||
{
|
||||
lat = -lat;
|
||||
lon = -lon;
|
||||
phi = -phi;
|
||||
lambda = -lambda;
|
||||
}
|
||||
|
||||
return new Location(lat * 180d / Math.PI, lon * 180d / Math.PI);
|
||||
return new Location(phi * 180d / Math.PI, lambda * 180d / Math.PI);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue