QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
QgsSpatialIndex Class Reference

#include <qgsspatialindex.h>

Public Member Functions

 QgsSpatialIndex ()
 constructor - creates R-tree
 QgsSpatialIndex (const QgsSpatialIndex &other)
 copy constructor
 ~QgsSpatialIndex ()
 destructor finalizes work with spatial index
QgsSpatialIndexoperator= (const QgsSpatialIndex &other)
 implement assignment operator
bool insertFeature (const QgsFeature &f)
 add feature to index
bool deleteFeature (const QgsFeature &f)
 remove feature from index
QList< QgsFeatureIdintersects (QgsRectangle rect) const
 returns features that intersect the specified rectangle
QList< QgsFeatureIdnearestNeighbor (QgsPoint point, int neighbors) const
 returns nearest neighbors (their count is specified by second parameter)
int refs () const
 get reference count - just for debugging!

Protected Member Functions

bool featureInfo (const QgsFeature &f, SpatialIndex::Region &r, QgsFeatureId &id)

Static Protected Member Functions

static SpatialIndex::Region rectToRegion (QgsRectangle rect)

Constructor & Destructor Documentation

QgsSpatialIndex::QgsSpatialIndex ( )

constructor - creates R-tree

QgsSpatialIndex::QgsSpatialIndex ( const QgsSpatialIndex other)

copy constructor

QgsSpatialIndex::~QgsSpatialIndex ( )

destructor finalizes work with spatial index

Member Function Documentation

bool QgsSpatialIndex::deleteFeature ( const QgsFeature f)

remove feature from index

bool QgsSpatialIndex::featureInfo ( const QgsFeature f,
SpatialIndex::Region &  r,
QgsFeatureId id 
)
protected
bool QgsSpatialIndex::insertFeature ( const QgsFeature f)

add feature to index

QList< QgsFeatureId > QgsSpatialIndex::intersects ( QgsRectangle  rect) const

returns features that intersect the specified rectangle

QList< QgsFeatureId > QgsSpatialIndex::nearestNeighbor ( QgsPoint  point,
int  neighbors 
) const

returns nearest neighbors (their count is specified by second parameter)

QgsSpatialIndex & QgsSpatialIndex::operator= ( const QgsSpatialIndex other)

implement assignment operator

Region QgsSpatialIndex::rectToRegion ( QgsRectangle  rect)
staticprotected
int QgsSpatialIndex::refs ( ) const

get reference count - just for debugging!


The documentation for this class was generated from the following files: