Interface ISpatialIndex<T>
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.
Namespace: NetTopologySuite.Index
Assembly: NetTopologySuite.dll
Syntax
public interface ISpatialIndex<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
| Improve this Doc View SourceInsert(Envelope, T)
Adds a spatial item with an extent specified by the given Envelope
to the index.
Declaration
void Insert(Envelope itemEnv, T item)
Parameters
Type | Name | Description |
---|---|---|
Envelope | itemEnv | |
T | item |
Query(Envelope)
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.
Declaration
IList<T> Query(Envelope searchEnv)
Parameters
Type | Name | Description |
---|---|---|
Envelope | searchEnv | The envelope to query for. |
Returns
Type | Description |
---|---|
IList<T> | A list of the items found by the query. |
Query(Envelope, IItemVisitor<T>)
Queries the index for all items whose extents intersect the given search Envelope, and applies an IItemVisitor<T> to them. Note that some kinds of indexes may also return objects which do not in fact intersect the query envelope.
Declaration
void Query(Envelope searchEnv, IItemVisitor<T> visitor)
Parameters
Type | Name | Description |
---|---|---|
Envelope | searchEnv | The envelope to query for. |
IItemVisitor<T> | visitor | A visitor object to apply to the items found. |
Remove(Envelope, T)
Removes a single item from the tree.
Declaration
bool Remove(Envelope itemEnv, T item)
Parameters
Type | Name | Description |
---|---|---|
Envelope | itemEnv | The Envelope of the item to remove. |
T | item | The item to remove. |
Returns
Type | Description |
---|---|
Boolean |
|