QGIS API Documentation
3.6.0-Noosa (5873452)
|
A spatial index for QgsMeshFace objects. More...
#include <qgsmeshspatialindex.h>
Public Member Functions | |
QgsMeshSpatialIndex () | |
Constructor for QgsSpatialIndex. More... | |
QgsMeshSpatialIndex (const QgsMesh &triangularMesh, QgsFeedback *feedback=nullptr) | |
Constructor - creates R-tree and bulk loads faces from the specified mesh. More... | |
QgsMeshSpatialIndex (const QgsMeshSpatialIndex &other) | |
Copy constructor. More... | |
~QgsMeshSpatialIndex () | |
Destructor finalizes work with spatial index. More... | |
QList< int > | intersects (const QgsRectangle &rectangle) const |
Returns a list of face ids with a bounding box which intersects the specified rectangle. More... | |
QList< int > | nearestNeighbor (const QgsPointXY &point, int neighbors) const |
Returns nearest neighbors to a point. More... | |
QgsMeshSpatialIndex & | operator= (const QgsMeshSpatialIndex &other) |
Implement assignment operator. More... | |
A spatial index for QgsMeshFace objects.
QgsMeshSpatialIndex objects are implicitly shared and can be inexpensively copied.
Definition at line 48 of file qgsmeshspatialindex.h.
QgsMeshSpatialIndex::QgsMeshSpatialIndex | ( | ) |
Constructor for QgsSpatialIndex.
Creates an empty R-tree index.
Definition at line 295 of file qgsmeshspatialindex.cpp.
|
explicit |
Constructor - creates R-tree and bulk loads faces from the specified mesh.
The optional feedback object can be used to allow cancelation of bulk face loading. Ownership of feedback is not transferred, and callers must take care that the lifetime of feedback exceeds that of the spatial index construction.
Definition at line 300 of file qgsmeshspatialindex.cpp.
QgsMeshSpatialIndex::QgsMeshSpatialIndex | ( | const QgsMeshSpatialIndex & | other | ) |
Copy constructor.
Definition at line 305 of file qgsmeshspatialindex.cpp.
|
default |
Destructor finalizes work with spatial index.
QList< int > QgsMeshSpatialIndex::intersects | ( | const QgsRectangle & | rectangle | ) | const |
Returns a list of face ids with a bounding box which intersects the specified rectangle.
Definition at line 319 of file qgsmeshspatialindex.cpp.
QList< int > QgsMeshSpatialIndex::nearestNeighbor | ( | const QgsPointXY & | point, |
int | neighbors | ||
) | const |
Returns nearest neighbors to a point.
The number of neighbours returned is specified by the neighbours argument.
Definition at line 332 of file qgsmeshspatialindex.cpp.
QgsMeshSpatialIndex & QgsMeshSpatialIndex::operator= | ( | const QgsMeshSpatialIndex & | other | ) |
Implement assignment operator.
Definition at line 312 of file qgsmeshspatialindex.cpp.