GEOS
3.14.0dev
|
#include <VertexSequencePackedRtree.h>
Public Member Functions | |
VertexSequencePackedRtree (const CoordinateSequence &pts) | |
std::vector< Envelope > | getBounds () |
void | remove (std::size_t index) |
void | query (const Envelope &queryEnv, std::vector< std::size_t > &result) const |
A semi-static spatial index for points which occur in a spatially-coherent sequence. In particular, this is suitable for indexing the vertices of a geos::geom::LineString or geos::geom::Polygon ring.
The index is constructed in a batch fashion on a given sequence of coordinates. Coordinates can be removed via the remove() method.
Note that this index queries only the individual points of the input coordinate sequence, not any line segments which might be lie between them.
geos::index::VertexSequencePackedRtree::VertexSequencePackedRtree | ( | const CoordinateSequence & | pts | ) |
Creates a new tree over the given sequence of coordinates. The sequence should be spatially coherent to provide query performance.
pts | a sequence of points |
void geos::index::VertexSequencePackedRtree::query | ( | const Envelope & | queryEnv, |
std::vector< std::size_t > & | result | ||
) | const |
Queries the index to find all items which intersect an extent. The query result is a list of the indices of input coordinates which intersect the extent.
queryEnv | the query extent |
result | vector to fill with results |
void geos::index::VertexSequencePackedRtree::remove | ( | std::size_t | index | ) |
Removes the input item at the given index from the spatial index.
index | the index of the item in the input |