|
QGIS API Documentation
2.2.0-Valmiera
|
#include <qgsspatialindex.h>
Public Member Functions | |
| QgsSpatialIndex () | |
| constructor - creates R-tree | |
| ~QgsSpatialIndex () | |
| destructor finalizes work with spatial index | |
| bool | insertFeature (QgsFeature &f) |
| add feature to index | |
| bool | deleteFeature (QgsFeature &f) |
| remove feature from index | |
| QList< QgsFeatureId > | intersects (QgsRectangle rect) |
| returns features that intersect the specified rectangle | |
| QList< QgsFeatureId > | nearestNeighbor (QgsPoint point, int neighbors) |
| returns nearest neighbors (their count is specified by second parameter) | |
Protected Member Functions | |
| SpatialIndex::Region | rectToRegion (QgsRectangle rect) |
| bool | featureInfo (QgsFeature &f, SpatialIndex::Region &r, QgsFeatureId &id) |
Private Attributes | |
| SpatialIndex::IStorageManager * | mStorageManager |
| storage manager | |
| SpatialIndex::StorageManager::IBuffer * | mStorage |
| buffer for index data | |
| SpatialIndex::ISpatialIndex * | mRTree |
| R-tree containing spatial index. | |
Definition at line 41 of file qgsspatialindex.h.
| QgsSpatialIndex::QgsSpatialIndex | ( | ) |
constructor - creates R-tree
Definition at line 51 of file qgsspatialindex.cpp.
| QgsSpatialIndex::~QgsSpatialIndex | ( | ) |
destructor finalizes work with spatial index
Definition at line 75 of file qgsspatialindex.cpp.
| bool QgsSpatialIndex::deleteFeature | ( | QgsFeature & | f | ) |
remove feature from index
Definition at line 134 of file qgsspatialindex.cpp.
References FID_TO_NUMBER.
|
protected |
Definition at line 92 of file qgsspatialindex.cpp.
References QgsGeometry::boundingBox(), QgsFeature::geometry(), and QgsFeature::id().
| bool QgsSpatialIndex::insertFeature | ( | QgsFeature & | f | ) |
add feature to index
Definition at line 103 of file qgsspatialindex.cpp.
References FID_TO_NUMBER, and QgsDebugMsg.
Referenced by QgsPointSample::addSamplePoints(), QgsPointDisplacementRenderer::createDisplacementGroups(), QgsTransectSample::createSample(), and QgsOverlayAnalyzer::intersection().
| QList< QgsFeatureId > QgsSpatialIndex::intersects | ( | QgsRectangle | rect | ) |
returns features that intersect the specified rectangle
Definition at line 145 of file qgsspatialindex.cpp.
Referenced by QgsPointDisplacementRenderer::createDisplacementGroups(), QgsOverlayAnalyzer::intersectFeature(), and QgsTransectSample::otherTransectWithinDistance().
| QList< QgsFeatureId > QgsSpatialIndex::nearestNeighbor | ( | QgsPoint | point, |
| int | neighbors | ||
| ) |
returns nearest neighbors (their count is specified by second parameter)
Definition at line 157 of file qgsspatialindex.cpp.
References QgsPoint::x(), and QgsPoint::y().
Referenced by QgsPointSample::checkMinDistance().
|
protected |
Definition at line 82 of file qgsspatialindex.cpp.
References QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
|
private |
R-tree containing spatial index.
Definition at line 88 of file qgsspatialindex.h.
|
private |
buffer for index data
Definition at line 85 of file qgsspatialindex.h.
|
private |
storage manager
Definition at line 82 of file qgsspatialindex.h.
1.8.1.2