public override void SendTo(GeometryPipeline pipeline)
 {
     base.SendTo(pipeline);
     pipeline.BeginGeometry(SpatialType.LineString);
     this.SendFigure(pipeline);
     pipeline.EndGeometry();
 }
 public override void SendTo(GeometryPipeline pipeline)
 {
     base.SendTo(pipeline);
     pipeline.BeginGeometry(SpatialType.LineString);
     this.SendFigure(pipeline);
     pipeline.EndGeometry();
 }
        /// <summary>
        /// Initializes a new instance of the GeometryFactory class
        /// </summary>
        /// <param name="coordinateSystem">The coordinate system</param>
        internal GeometryFactory(CoordinateSystem coordinateSystem)
        {
            var builder = SpatialBuilder.Create();

            this.provider   = builder;
            this.buildChain = SpatialValidator.Create().ChainTo(builder).StartingLink;
            this.buildChain.SetCoordinateSystem(coordinateSystem);
        }
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.Collection);
            for (int i = 0; i < this.geometryArray.Length; ++i)
            {
                this.geometryArray[i].SendTo(pipeline);
            }

            pipeline.EndGeometry();
        }
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.MultiPolygon);
            for (int i = 0; i < this.polygons.Length; ++i)
            {
                this.polygons[i].SendTo(pipeline);
            }

            pipeline.EndGeometry();
        }
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.Collection);
            for (int i = 0; i < this.geometryArray.Length; ++i)
            {
                this.geometryArray[i].SendTo(pipeline);
            }

            pipeline.EndGeometry();
        }
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.MultiPolygon);
            for (int i = 0; i < this.polygons.Length; ++i)
            {
                this.polygons[i].SendTo(pipeline);
            }

            pipeline.EndGeometry();
        }
Example #8
0
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.Point);
            if (!this.IsEmpty)
            {
                pipeline.BeginFigure(new GeometryPosition(this.x, this.y, this.z, this.m));
                pipeline.EndFigure();
            }

            pipeline.EndGeometry();
        }
Example #9
0
 /// <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;
 }
Example #10
0
 /// <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;
 }
Example #11
0
 /// <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;
 }
Example #12
0
 /// <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;
 }
Example #13
0
 public static void DrawPoint(GeometryPipeline pipeline, PositionData point)
 {
     pipeline.BeginFigure(new GeometryPosition(point.X, point.Y, point.Z, point.M));
     pipeline.EndFigure();
 }
Example #14
0
 /// <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))
 {
 }
Example #15
0
        public static void DrawLine(GeometryPipeline pipeline, PositionData[] line)
        {
            for (int i = 0; i < line.Length; ++i)
            {
                PositionData currentLine = line[i];
                if (i == 0)
                {
                    pipeline.BeginFigure(new GeometryPosition(currentLine.X, currentLine.Y, currentLine.Z, currentLine.M));
                }
                else
                {
                    pipeline.LineTo(new GeometryPosition(currentLine.X, currentLine.Y, currentLine.Z, currentLine.M));
                }
            }

            pipeline.EndFigure();
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="output">The pipeline to redirect the calls to</param>
 public TypeWashedToGeometryPipeline(SpatialPipeline output)
 {
     this.output = output;
 }
Example #17
0
 public GeometryLoggingPipeline()
 {
     this.pipeline = new CallSequenceLoggingPipeline();
     this.drawGeometry = pipeline;
 }
        public override void SendTo(GeometryPipeline pipeline)
        {
            base.SendTo(pipeline);
            pipeline.BeginGeometry(SpatialType.Point);
            if (!this.IsEmpty)
            {
                pipeline.BeginFigure(new GeometryPosition(this.x, this.y, this.z, this.m));
                pipeline.EndFigure();
            }

            pipeline.EndGeometry();
        }