com.vividsolutions.jts.index
Interface SpatialIndex
- Quadtree, STRtree
public interface SpatialIndex
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.
void | insert(Envelope itemEnv, Object item) - Adds a spatial item with an extent specified by the given
Envelope to the index
|
List | query(Envelope searchEnv) - 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.
|
boolean | remove(Envelope itemEnv, Object item) - Removes a single item from the tree.
|
insert
public void insert(Envelope itemEnv,
Object item)
Adds a spatial item with an extent specified by the given
Envelope
to the index
query
public List query(Envelope searchEnv)
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.
searchEnv
- the envelope to query for
- a list of the items found by the query
remove
public boolean remove(Envelope itemEnv,
Object item)
Removes a single item from the tree.
itemEnv
- the Envelope of the item to removeitem
- the item to remove
true
if the item was found