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

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)
 

Detailed Description

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

Author
Martin Davis

Member Function Documentation

◆ insert()

void geos::index::intervalrtree::SortedPackedIntervalRTree::insert ( double  min,
double  max,
void *  item 
)
inline

Adds an item to the index which is associated with the given interval

Parameters
minthe lower bound of the item interval
maxthe upper bound of the item interval
itemthe item to insert, ownership left to caller
Exceptions
IllegalStateExceptionif the index has already been queried

◆ query()

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.

Parameters
minthe lower bound of the query interval
maxthe upper bound of the query interval
visitorthe visitor to pass any matched items to

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