示例#1
0
 public static void SendTo(this ISpatial shape, SpatialPipeline destination)
 {
     if (shape != null)
     {
         if (shape.GetType().IsSubclassOf(typeof(Geometry)))
         {
             ((Geometry) shape).SendTo((GeometryPipeline) destination);
         }
         else
         {
             ((Geography) shape).SendTo((GeographyPipeline) destination);
         }
     }
 }
 /// <summary>
 /// Reads the geometry.
 /// </summary>
 /// <param name="readerStream">The reader stream.</param>
 /// <param name="pipeline">The pipeline.</param>
 protected override void ReadGeometry(XmlReader readerStream, SpatialPipeline pipeline)
 {
     new GmlReader(pipeline).ReadGeometry(readerStream);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="output">The pipeline to redirect the calls to</param>
 public TypeWashedToGeographyLatLongPipeline(SpatialPipeline output)
 {
     this.output = output;
 }
 public TypeWashedToGeometryPipeline(SpatialPipeline output)
 {
     this.output = (GeometryPipeline) output;
 }
示例#5
0
 /// <summary> Reads the Geography from the readerStream and call the appropriate pipeline methods.</summary>
 /// <param name="readerStream">The stream to read from.</param>
 /// <param name="pipeline">The pipeline to call based on what is read.</param>
 protected abstract void ReadGeography(TReaderStream readerStream, SpatialPipeline pipeline);
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="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;
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SpatialPipeline"/> class.
 /// </summary>
 public SpatialPipeline()
 {
     this.startingLink = this;
 }
示例#8
0
        public void Write(ISpatial spatial, TWriterStream writerStream)
        {
            SpatialPipeline destination = this.CreateWriter(writerStream);

            spatial.SendTo(destination);
        }
示例#9
0
 public virtual SpatialPipeline ChainTo(SpatialPipeline destination)
 {
     throw new NotImplementedException();
 }
示例#10
0
 public SpatialPipeline(System.Spatial.GeographyPipeline geographyPipeline, System.Spatial.GeometryPipeline geometryPipeline)
 {
     this.geographyPipeline = geographyPipeline;
     this.geometryPipeline  = geometryPipeline;
     this.startingLink      = this;
 }
示例#11
0
 public SpatialPipeline()
 {
     this.startingLink = this;
 }
示例#12
0
 /// <summary> Initializes a new instance of the <see cref="T:System.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;
 }
示例#13
0
 public SpatialPipeline(System.Spatial.GeographyPipeline geographyPipeline, System.Spatial.GeometryPipeline geometryPipeline)
 {
     this.geographyPipeline = geographyPipeline;
     this.geometryPipeline = geometryPipeline;
     this.startingLink = this;
 }
示例#14
0
        /// <summary>
        /// Creates a reader
        /// </summary>
        /// <param name="destination">the instance of the pipeline that the reader will message while it is reading.</param>
        protected SpatialReader(SpatialPipeline destination)
        {
            Util.CheckArgumentNull(destination, "destination");

            this.Destination = destination;
        }
示例#15
0
 /// <summary>
 /// Add the next pipeline
 /// </summary>
 /// <param name="destination">the next pipleine</param>
 /// <returns>The last pipesegment in the chain, usually the one just created</returns>
 public virtual SpatialPipeline ChainTo(SpatialPipeline destination)
 {
     throw new NotImplementedException();
 }
 public TypeWashedToGeographyLongLatPipeline(SpatialPipeline output)
 {
     this.output = (GeographyPipeline) output;
 }
 protected override void ReadGeometry(TextReader readerStream, SpatialPipeline pipeline)
 {
     new WellKnownTextSqlReader(pipeline, this.allowOnlyTwoDimensions).ReadGeometry(readerStream);
 }