Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a single <see cref="ISpatial"/> to the <see cref="ISpatialCollection"/>.
 /// </summary>
 /// <param name="spatial">The <see cref="ISpatial"/> to add.</param>
 public void Add(ISpatial spatial)
 {
     GetSpatialCollection(spatial.GetType()).Add(spatial);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Removes an <see cref="ISpatial"/> from the spatial collection.
 /// </summary>
 /// <param name="spatial">The <see cref="ISpatial"/> to remove.</param>
 public void Remove(ISpatial spatial)
 {
     GetSpatialCollection(spatial.GetType()).Remove(spatial);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Checks if this <see cref="ISpatialCollection"/> contains the given <paramref name="spatial"/>.
 /// </summary>
 /// <param name="spatial">The <see cref="ISpatial"/> to look for.</param>
 /// <returns>
 /// True if this <see cref="ISpatialCollection"/> contains the given <paramref name="spatial"/>;
 /// otherwise false.
 /// </returns>
 public bool CollectionContains(ISpatial spatial)
 {
     return(GetSpatialCollection(spatial.GetType()).CollectionContains(spatial));
 }