Esempio n. 1
0
        //Not supporting Z and M values
        public static void ProjectPoint(SqlGeographyBuilder builder, SqlGeometry point, Func <IPoint, IPoint> mapFunction)
        {
            //Point thePoint = mapFunction(new Point(point.Long.Value, point.Lat.Value));
            var thePoint = mapFunction(point.AsPoint());

            builder.BeginFigure(thePoint.Y, thePoint.X);

            builder.EndFigure();
        }
Esempio n. 2
0
        private static Geometry ExtractPointsFromPoint(SqlGeometry geometry)
        {
            var srid = geometry.GetSrid();

            //This check is required
            if (geometry.IsNullOrEmpty())
            {
                return(Geometry.CreateEmpty(GeometryType.Point, srid));
            }

            return(new Geometry(new IPoint[] { geometry.AsPoint() }, GeometryType.Point)
            {
                Srid = srid
            });
        }