#include <SpatialIndex.h>
Public Member Functions | |
virtual void | insert (const geom::Envelope *itemEnv, void *item)=0 |
Adds a spatial item with an extent specified by the given Envelope to the index. | |
virtual void | query (const geom::Envelope *searchEnv, std::vector< void * > &)=0 |
Queries the index for all items whose extents intersect the given search Envelope. | |
virtual void | query (const geom::Envelope *searchEnv, ItemVisitor &visitor)=0 |
Queries the index for all items whose extents intersect the given search Envelope and applies an ItemVisitor to them. | |
virtual bool | remove (const geom::Envelope *itemEnv, void *item)=0 |
Removes a single item from the tree. |
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.
Last port: index/SpatialIndex.java rev. 1.11 (JTS-1.7)
virtual void geos::index::SpatialIndex::query | ( | const geom::Envelope * | searchEnv, | |
std::vector< void * > & | ||||
) | [pure virtual] |
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 |
Implemented in geos::index::quadtree::Quadtree, and geos::index::strtree::STRtree.
virtual void geos::index::SpatialIndex::query | ( | const geom::Envelope * | searchEnv, | |
ItemVisitor & | visitor | |||
) | [pure virtual] |
Queries the index for all items whose extents intersect the given search Envelope and applies an ItemVisitor to them.
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 | |
visitor | a visitor object to apply to the items found |
Implemented in geos::index::quadtree::Quadtree, and geos::index::strtree::STRtree.
virtual bool geos::index::SpatialIndex::remove | ( | const geom::Envelope * | itemEnv, | |
void * | item | |||
) | [pure virtual] |
Removes a single item from the tree.
itemEnv | the Envelope of the item to remove | |
item | the item to remove |
true
if the item was found Implemented in geos::index::quadtree::Quadtree, and geos::index::strtree::STRtree.