public static void TestLanLonFuncs() { if (MercatorCoordinateSystem.beenHere) { return; } MercatorCoordinateSystem.beenHere = true; foreach (LatLon current in new List <LatLon> { new LatLon(-85.0, -175.0), new LatLon(85.0, -175.0), new LatLon(85.0, 175.0), new LatLon(-85.0, 175.0), new LatLon(1.0, 1.0) }) { LatLon latLon = MercatorCoordinateSystem.LatLonToMercator(current); LatLon latLon2 = MercatorCoordinateSystem.MercatorToLatLon(latLon); D.Sayf(0, "Orig {0} merc {1} back {2}", new object[] { current, latLon, latLon2 }); } }
public override void doTransform(PointD p0, PointD p1, out bool isApproximate) { PointD pointD = MercatorCoordinateSystem.MercatorToLatLon(this.sourceToMercator.getTransformedPoint(p0, out isApproximate)); p1.x = pointD.x; p1.y = pointD.y; }