public override void SendTo(GeographyPipeline pipeline) { base.SendTo(pipeline); pipeline.BeginGeography(SpatialType.LineString); this.SendFigure(pipeline); pipeline.EndGeography(); }
public override void SendTo(GeographyPipeline pipeline) { base.SendTo(pipeline); pipeline.BeginGeography(SpatialType.MultiPolygon); for (int i = 0; i < this.polygons.Length; ++i) { this.polygons[i].SendTo(pipeline); } pipeline.EndGeography(); }
public override void SendTo(GeographyPipeline pipeline) { base.SendTo(pipeline); pipeline.BeginGeography(SpatialType.Collection); for (int i = 0; i < this.geographyArray.Length; ++i) { this.geographyArray[i].SendTo(pipeline); } 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> Initializes a new instance of the <see cref="T:Microsoft.Spatial.SpatialPipeline" /> class. </summary> /// <param name="geographyPipeline">The geography chain.</param> /// <param name="geometryPipeline">The geometry chain.</param> public SpatialPipeline(GeographyPipeline geographyPipeline, GeometryPipeline geometryPipeline) { this.geographyPipeline = geographyPipeline; this.geometryPipeline = geometryPipeline; this.startingLink = this; }
public GeometryToGeographyPipeline(GeographyPipeline destination, Func<GeometryPosition, GeographyPosition> convertPosition) { ExceptionUtilities.CheckArgumentNotNull(destination, "destination"); ExceptionUtilities.CheckArgumentNotNull(convertPosition, "convertPosition"); this.Destination = destination; this.ConvertPosition = convertPosition; }
/// <summary> /// Creates the conversion chain. /// </summary> /// <param name="destination">The destination.</param> /// <param name="convertPosition">The delegate to use for converting positions.</param> /// <returns>The conversion chain</returns> internal static GeometryPipeline CreateConversionChain(GeographyPipeline destination, Func<GeometryPosition, GeographyPosition> convertPosition) { return new GeometryToGeographyPipeline(destination, convertPosition); }
/// <summary> /// Constructor /// </summary> /// <param name="output">The pipeline to redirect the calls to</param> public TypeWashedToGeographyLatLongPipeline(SpatialPipeline output) { this.output = output; }
/// <summary> /// Initializes a new instance of the <see cref="ForwardingSegment"/> class. /// </summary> /// <param name="currentGeography">The current geography.</param> /// <param name="currentGeometry">The current geometry.</param> public ForwardingSegment(GeographyPipeline currentGeography, GeometryPipeline currentGeometry) : this(new SpatialPipeline(currentGeography, currentGeometry)) { }
public static void DrawPoint(GeographyPipeline pipeline, PositionData point) { pipeline.BeginFigure(new GeographyPosition(point.X, point.Y, point.Z, point.M)); pipeline.EndFigure(); }
/// <summary>Initializes a new instance of the <see cref="Microsoft.Spatial.SpatialBuilder" /> class.</summary> /// <param name="geographyInput">The geography input.</param> /// <param name="geometryInput">The geometry input.</param> /// <param name="geographyOutput">The geography output.</param> /// <param name="geometryOutput">The geometry output.</param> public SpatialBuilder(GeographyPipeline geographyInput, GeometryPipeline geometryInput, IGeographyProvider geographyOutput, IGeometryProvider geometryOutput) : base(geographyInput, geometryInput) { this.geographyOutput = geographyOutput; this.geometryOutput = geometryOutput; }
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.</summary> /// <param name="chain">The spatial pipeline.</param> public virtual void SendTo(GeographyPipeline chain) { Util.CheckArgumentNull(chain, "chain"); chain.SetCoordinateSystem(this.coordinateSystem); }
/// <summary> /// Creates a new instance of the GeographyLoggingPipeline. /// </summary> /// <param name="reverseCoordinates"> /// True if calls to BeginFigure and AddLine should reverse the first two coordinates before logging the call. /// </param> public GeographyLoggingPipeline(bool reverseCoordinates) { this.reverseCoordinates = reverseCoordinates; this.pipeline = new CallSequenceLoggingPipeline(); this.drawGeography = pipeline; }
/// <summary>Initializes a new instance of the <see cref="T:Microsoft.Spatial.SpatialBuilder" /> class.</summary> /// <param name="geographyInput">The geography input.</param> /// <param name="geometryInput">The geometry input.</param> /// <param name="geographyOutput">The geography output.</param> /// <param name="geometryOutput">The geometry output.</param> public SpatialBuilder(GeographyPipeline geographyInput, GeometryPipeline geometryInput, IGeographyProvider geographyOutput, IGeometryProvider geometryOutput) : base(geographyInput, geometryInput) { this.geographyOutput = geographyOutput; this.geometryOutput = geometryOutput; }
/// <summary> Initializes a new instance of the <see cref="Microsoft.Spatial.SpatialPipeline" /> class. </summary> /// <param name="geographyPipeline">The geography chain.</param> /// <param name="geometryPipeline">The geometry chain.</param> public SpatialPipeline(GeographyPipeline geographyPipeline, GeometryPipeline geometryPipeline) { this.geographyPipeline = geographyPipeline; this.geometryPipeline = geometryPipeline; this.startingLink = this; }
public override void SendTo(GeographyPipeline pipeline) { base.SendTo(pipeline); pipeline.BeginGeography(SpatialType.FullGlobe); pipeline.EndGeography(); }
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(); }