using System.Collections; using GeoAPI.Geometries; using GisSharpBlog.NetTopologySuite.Geometries; namespace GisSharpBlog.NetTopologySuite.Index { /// /// The basic insertion and query operations supported by classes /// implementing spatial index algorithms. /// A spatial index typically provides a primary filter for range rectangle queries. A /// secondary filter is required to test for exact intersection. Of course, this /// secondary filter may consist of other tests besides intersection, such as /// testing other kinds of spatial relationships. /// public interface ISpatialIndex { /// /// Adds a spatial item with an extent specified by the given Envelope to the index. /// void Insert(IEnvelope itemEnv, object item); /// /// Queries the index for all items whose extents intersect the given search Envelope /// Note that some kinds of indexes may also return objects which do not in fact /// intersect the query envelope. /// /// The envelope to query for. /// A list of the items found by the query. IList Query(IEnvelope searchEnv); /// /// Queries the index for all items whose extents intersect the given search , /// and applies an to them. /// Note that some kinds of indexes may also return objects which do not in fact /// intersect the query envelope. /// /// The envelope to query for. /// A visitor object to apply to the items found. void Query(IEnvelope searchEnv, IItemVisitor visitor); /// /// Removes a single item from the tree. /// /// The Envelope of the item to remove. /// The item to remove. /// true if the item was found. bool Remove(IEnvelope itemEnv, object item); } }