QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A generic rtree spatial index based on a libspatialindex backend. More...
#include <qgsgenericspatialindex.h>
Public Member Functions | |
QgsGenericSpatialIndex () | |
Constructor for QgsGenericSpatialIndex. | |
bool | 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. | |
bool | isEmpty () const |
Returns true if the index contains no items. | |
bool | remove (T *data, const QgsRectangle &bounds) |
Removes existing data from the spatial index, with the specified bounds. | |
A generic rtree spatial index based on a libspatialindex backend.
Definition at line 44 of file qgsgenericspatialindex.h.
|
inline |
Constructor for QgsGenericSpatialIndex.
Definition at line 51 of file qgsgenericspatialindex.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 63 of file qgsgenericspatialindex.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 123 of file qgsgenericspatialindex.h.
|
inline |
Returns true
if the index contains no items.
Definition at line 136 of file qgsgenericspatialindex.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 101 of file qgsgenericspatialindex.h.