GEOS  3.14.0dev
Public Member Functions | List of all members
geos::index::VertexSequencePackedRtree Class Reference

#include <VertexSequencePackedRtree.h>

Public Member Functions

 VertexSequencePackedRtree (const CoordinateSequence &pts)
 
std::vector< EnvelopegetBounds ()
 
void remove (std::size_t index)
 
void query (const Envelope &queryEnv, std::vector< std::size_t > &result) const
 

Detailed Description

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.

Author
Martin Davis

Constructor & Destructor Documentation

◆ VertexSequencePackedRtree()

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.

Parameters
ptsa sequence of points

Member Function Documentation

◆ query()

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.

Parameters
queryEnvthe query extent
resultvector to fill with results

◆ remove()

void geos::index::VertexSequencePackedRtree::remove ( std::size_t  index)

Removes the input item at the given index from the spatial index.

Parameters
indexthe index of the item in the input

The documentation for this class was generated from the following file: