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> /// 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); }
/// <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); }
/// <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)); }