GEOS 3.11.1
|
A static index on a set of 1-dimensional intervals, using an R-Tree packed based on the order of the interval midpoints. More...
#include <SortedPackedIntervalRTree.h>
Public Member Functions | |
SortedPackedIntervalRTree (std::size_t initialCapacity) | |
void | insert (double min, double max, void *item) |
void | query (double min, double max, index::ItemVisitor *visitor) |
A static index on a set of 1-dimensional intervals, using an R-Tree packed based on the order of the interval midpoints.
It supports range searching, where the range is an interval of the real line (which may be a single point). A common use is to index 1-dimensional intervals which are the projection of 2-D objects onto an axis of the coordinate system.
This index structure is static
|
inline |
Adds an item to the index which is associated with the given interval
min | the lower bound of the item interval |
max | the upper bound of the item interval |
item | the item to insert, ownership left to caller |
IllegalStateException | if the index has already been queried |
void geos::index::intervalrtree::SortedPackedIntervalRTree::query | ( | double | min, |
double | max, | ||
index::ItemVisitor * | visitor | ||
) |
Search for intervals in the index which intersect the given closed interval and apply the visitor to them.
min | the lower bound of the query interval |
max | the upper bound of the query interval |
visitor | the visitor to pass any matched items to |