예제 #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();
        }
예제 #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
            });
        }