QGIS API Documentation
2.10.1-Pisa
|
#include <qgsspatialindex.h>
Public Member Functions | |
QgsSpatialIndex () | |
constructor - creates R-tree More... | |
QgsSpatialIndex (const QgsFeatureIterator &fi) | |
constructor - creates R-tree and bulk loads it with features from the iterator. More... | |
QgsSpatialIndex (const QgsSpatialIndex &other) | |
copy constructor More... | |
~QgsSpatialIndex () | |
destructor finalizes work with spatial index More... | |
bool | deleteFeature (const QgsFeature &f) |
remove feature from index More... | |
bool | insertFeature (const QgsFeature &f) |
add feature to index More... | |
QList< QgsFeatureId > | intersects (QgsRectangle rect) const |
returns features that intersect the specified rectangle More... | |
QList< QgsFeatureId > | nearestNeighbor (QgsPoint point, int neighbors) const |
returns nearest neighbors (their count is specified by second parameter) More... | |
QgsSpatialIndex & | operator= (const QgsSpatialIndex &other) |
implement assignment operator More... | |
QAtomicInt | refs () const |
get reference count - just for debugging! More... | |
Static Protected Member Functions | |
static bool | featureInfo (const QgsFeature &f, SpatialIndex::Region &r, QgsFeatureId &id) |
static SpatialIndex::Region | rectToRegion (QgsRectangle rect) |
Friends | |
class | QgsFeatureIteratorDataStream |
Definition at line 45 of file qgsspatialindex.h.
QgsSpatialIndex::QgsSpatialIndex | ( | ) |
constructor - creates R-tree
Definition at line 199 of file qgsspatialindex.cpp.
|
explicit |
constructor - creates R-tree and bulk loads it with features from the iterator.
This is much faster approach than creating an empty index and then inserting features one by one.
Definition at line 204 of file qgsspatialindex.cpp.
QgsSpatialIndex::QgsSpatialIndex | ( | const QgsSpatialIndex & | other | ) |
copy constructor
Definition at line 209 of file qgsspatialindex.cpp.
QgsSpatialIndex::~QgsSpatialIndex | ( | ) |
destructor finalizes work with spatial index
Definition at line 214 of file qgsspatialindex.cpp.
bool QgsSpatialIndex::deleteFeature | ( | const QgsFeature & | f | ) |
remove feature from index
Definition at line 279 of file qgsspatialindex.cpp.
|
staticprotected |
Definition at line 235 of file qgsspatialindex.cpp.
bool QgsSpatialIndex::insertFeature | ( | const QgsFeature & | f | ) |
add feature to index
Definition at line 248 of file qgsspatialindex.cpp.
QList< QgsFeatureId > QgsSpatialIndex::intersects | ( | QgsRectangle | rect | ) | const |
returns features that intersect the specified rectangle
Definition at line 290 of file qgsspatialindex.cpp.
QList< QgsFeatureId > QgsSpatialIndex::nearestNeighbor | ( | QgsPoint | point, |
int | neighbors | ||
) | const |
returns nearest neighbors (their count is specified by second parameter)
Definition at line 302 of file qgsspatialindex.cpp.
QgsSpatialIndex & QgsSpatialIndex::operator= | ( | const QgsSpatialIndex & | other | ) |
implement assignment operator
Definition at line 218 of file qgsspatialindex.cpp.
|
staticprotected |
Definition at line 225 of file qgsspatialindex.cpp.
QAtomicInt QgsSpatialIndex::refs | ( | ) | const |
get reference count - just for debugging!
Definition at line 317 of file qgsspatialindex.cpp.
|
friend |
Definition at line 99 of file qgsspatialindex.h.