public override void SendTo(GeographyPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeography(SpatialType.Point);
            if (!this.IsEmpty)
            {
                pipeline.BeginFigure(new GeographyPosition(this.latitude, this.longitude, this.z, this.m));
                pipeline.EndFigure();
            }

            pipeline.EndGeography();
        }
        /// <summary>
        /// Sends the current spatial object to the given pipeline with a figure that represents this LineString
        /// </summary>
        /// <param name="lineString">GeographyLineString instance to serialize.</param>
        /// <param name="pipeline">The pipeline to populate to</param>
        internal static void SendFigure(this GeographyLineString lineString, GeographyPipeline pipeline)
        {
            ReadOnlyCollection<GeographyPoint> points = lineString.Points;
            for (int i = 0; i < points.Count; ++i)
            {
                if (i == 0)
                {
                    pipeline.BeginFigure(new GeographyPosition(points[i].Latitude, points[i].Longitude, points[i].Z, points[i].M));
                }
                else
                {
                    pipeline.LineTo(new GeographyPosition(points[i].Latitude, points[i].Longitude, points[i].Z, points[i].M));
                }
            }

            if (points.Count > 0)
            {
                pipeline.EndFigure();
            }
        }
        /// <summary>
        /// Sends the current spatial object to the given pipeline with a figure that represents this LineString
        /// </summary>
        /// <param name="lineString">GeographyLineString instance to serialize.</param>
        /// <param name="pipeline">The pipeline to populate to</param>
        internal static void SendFigure(this GeographyLineString lineString, GeographyPipeline pipeline)
        {
            ReadOnlyCollection <GeographyPoint> points = lineString.Points;

            for (int i = 0; i < points.Count; ++i)
            {
                if (i == 0)
                {
                    pipeline.BeginFigure(new GeographyPosition(points[i].Latitude, points[i].Longitude, points[i].Z, points[i].M));
                }
                else
                {
                    pipeline.LineTo(new GeographyPosition(points[i].Latitude, points[i].Longitude, points[i].Z, points[i].M));
                }
            }

            if (points.Count > 0)
            {
                pipeline.EndFigure();
            }
        }
        public override void SendTo(GeographyPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeography(SpatialType.Point);
            if (!this.IsEmpty)
            {
                pipeline.BeginFigure(new GeographyPosition(this.latitude, this.longitude, this.z, this.m));
                pipeline.EndFigure();
            }

            pipeline.EndGeography();
        }
示例#5
0
 public static void DrawPoint(GeographyPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(new GeographyPosition(point.X, point.Y, point.Z, point.M));
     pipeline.EndFigure();
 }
示例#6
0
        public static void DrawLine(GeographyPipeline pipeline, PositionData[] line)
        {
            for (int i = 0; i < line.Length; ++i)
            {
                if (i == 0)
                {
                    pipeline.BeginFigure(new GeographyPosition(line[i].X, line[i].Y, line[i].Z, line[i].M));
                }
                else
                {
                    pipeline.LineTo(new GeographyPosition(line[i].X, line[i].Y, line[i].Z, line[i].M));
                }
            }

            pipeline.EndFigure();
        }