QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
A rtree spatial index for use in the pal labeling engine. More...
#include <palrtree.h>
Public Member Functions | |
PalRtree (const QgsRectangle &maxBounds) | |
Constructor for PalRtree. | |
void | insert (T *data, const QgsRectangle &bounds) |
Inserts new data into the spatial index, with the specified bounds. | |
bool | intersects (const QgsRectangle &bounds, const std::function< bool(T *data)> &callback) const |
Performs an intersection check against the index, for data intersecting the specified bounds. | |
void | remove (T *data, const QgsRectangle &bounds) |
Removes existing data from the spatial index, with the specified bounds. | |
A rtree spatial index for use in the pal labeling engine.
Definition at line 35 of file palrtree.h.
|
inline |
Constructor for PalRtree.
The maxBounds argument specifies the maximum bounding box for all coordinates which will be stored in the index.
Definition at line 43 of file palrtree.h.
|
inline |
Inserts new data into the spatial index, with the specified bounds.
Ownership of data is not transferred, and it is the caller's responsibility to ensure that it exists for the lifetime of the spatial index.
Definition at line 59 of file palrtree.h.
|
inline |
Performs an intersection check against the index, for data intersecting the specified bounds.
The callback function will be called once for each matching data object encountered.
Definition at line 96 of file palrtree.h.
|
inline |
Removes existing data from the spatial index, with the specified bounds.
data is not deleted, and it is the caller's responsibility to ensure that it is appropriately cleaned up.
Definition at line 78 of file palrtree.h.