Beispiel #1
0
        static void ProjectPolygon(ref Polygon polygon, double lattitude, double longitude)
        {
            GeographicCoordinates coords = new GeographicCoordinates(lattitude, longitude);
            FlatEarthProjection   fep    = new FlatEarthProjection(coords);

            for (int i = 0; i < polygon.verts.Count - 1; i += 3)
            {
                double x, y;
                fep.TransformToCartesian(polygon.verts[i + 1], polygon.verts[i], out x, out y);
                polygon.verts[i]     = y;
                polygon.verts[i + 1] = x;
            }
        }
Beispiel #2
0
 public ScaledFlatEarthProjection(GeographicCoordinates origin, double scale)
 {
     Projection = new FlatEarthProjection(origin);
     Scale      = scale;
 }