GEOS 3.14.0dev
|
Abstract class defines basic insertion and query operations supported by classes implementing spatial index algorithms. More...
#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. | |
Abstract class defines 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.
Last port: index/SpatialIndex.java rev. 1.11 (JTS-1.7)
|
pure virtual |
Adds a spatial item with an extent specified by the given Envelope to the index.
itemEnv | Envelope of the item, ownership left to caller. TODO: Reference hold by this class ? |
item | Opaque item, ownership left to caller. Reference hold by this class. |
Implemented in geos::index::quadtree::Quadtree, geos::index::strtree::SimpleSTRtree, and geos::index::strtree::STRtree.
|
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, geos::index::strtree::SimpleSTRtree, and geos::index::strtree::STRtree.
|
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::strtree::SimpleSTRtree, geos::index::strtree::STRtree, and geos::index::quadtree::Quadtree.
|
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, geos::index::strtree::STRtree, and geos::index::strtree::SimpleSTRtree.