Project() public method

Calculates the coordinates of the point in the projection plane.
public Project ( double latitude, double longitude, double &x, double &y ) : void
latitude double Latitude of the
longitude double Longitude points
x double X coordinate in the plane of projection
y double Y-coordinate in the plane of projection
return void
 private static PointD projectPoint(GeoPoint point, GnomonicProjection projection)
 {
     PointD p = point.ToPlanarPoint(false);
     double x, y;
     projection.Project(p.Y, p.X, out x, out y);
     p.X = x;
     p.Y = y;
     return p;
 }
Beispiel #2
0
        private static PointD projectPoint(GeoPoint point, GnomonicProjection projection)
        {
            PointD p = point.ToPlanarPoint(false);
            double x, y;

            projection.Project(p.Y, p.X, out x, out y);
            p.X = x;
            p.Y = y;
            return(p);
        }
        private static MultiPoint projectMultiPoint(GeoMultiPoint multiPoint, GnomonicProjection projection)
        {
            MultiPoint mp = multiPoint.ToPlanarMultiPoint(false);
            for (int i = 0; i < mp.Points.Count; i++)
            {
                double x, y;
                projection.Project(mp.Points[i].Y, mp.Points[i].X, out x, out y);
                mp.Points[i] = PlanimetryEnvironment.NewCoordinate(x, y);
            }

            return mp;
        }
Beispiel #4
0
        private static MultiPoint projectMultiPoint(GeoMultiPoint multiPoint, GnomonicProjection projection)
        {
            MultiPoint mp = multiPoint.ToPlanarMultiPoint(false);

            for (int i = 0; i < mp.Points.Count; i++)
            {
                double x, y;
                projection.Project(mp.Points[i].Y, mp.Points[i].X, out x, out y);
                mp.Points[i] = PlanimetryEnvironment.NewCoordinate(x, y);
            }

            return(mp);
        }
        private static Polyline projectPolyline(GeoPolyline polyline, GnomonicProjection projection)
        {
            Polyline p = polyline.ToPlanarPolyline(false);
            foreach (LinePath path in p.Paths)
            {
                for (int i = 0; i < path.Vertices.Count; i++)
                {
                    double x, y;
                    projection.Project(path.Vertices[i].Y, path.Vertices[i].X, out x, out y);
                    path.Vertices[i] = PlanimetryEnvironment.NewCoordinate(x, y);
                }
            }

            return p;
        }
Beispiel #6
0
        private static Polygon projectPolygon(GeoPolygon polygon, GnomonicProjection projection)
        {
            Polygon p = polygon.ToPlanarPolygon(false);

            foreach (Contour contour in p.Contours)
            {
                for (int i = 0; i < contour.Vertices.Count; i++)
                {
                    double x, y;
                    projection.Project(contour.Vertices[i].Y, contour.Vertices[i].X, out x, out y);
                    contour.Vertices[i] = PlanimetryEnvironment.NewCoordinate(x, y);
                }
            }

            return(p);
        }
Beispiel #7
0
        private static Polyline projectPolyline(GeoPolyline polyline, GnomonicProjection projection)
        {
            Polyline p = polyline.ToPlanarPolyline(false);

            foreach (LinePath path in p.Paths)
            {
                for (int i = 0; i < path.Vertices.Count; i++)
                {
                    double x, y;
                    projection.Project(path.Vertices[i].Y, path.Vertices[i].X, out x, out y);
                    path.Vertices[i] = PlanimetryEnvironment.NewCoordinate(x, y);
                }
            }

            return(p);
        }
        private static Polygon projectPolygon(GeoPolygon polygon, GnomonicProjection projection)
        {
            Polygon p = polygon.ToPlanarPolygon(false);
            foreach (Contour contour in p.Contours)
            {
                for (int i = 0; i < contour.Vertices.Count; i++)
                {
                    double x, y;
                    projection.Project(contour.Vertices[i].Y, contour.Vertices[i].X, out x, out y);
                    contour.Vertices[i] = PlanimetryEnvironment.NewCoordinate(x, y);
                }
            }

            return p;
        }