QGIS API Documentation  2.5.0-Master
 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 More...
 
 QgsSpatialIndex (const QgsSpatialIndex &other)
 copy constructor More...
 
 ~QgsSpatialIndex ()
 destructor finalizes work with spatial index More...
 
QgsSpatialIndexoperator= (const QgsSpatialIndex &other)
 implement assignment operator More...
 
bool insertFeature (const QgsFeature &f)
 add feature to index More...
 
bool deleteFeature (const QgsFeature &f)
 remove feature from index More...
 
QList< QgsFeatureIdintersects (QgsRectangle rect) const
 returns features that intersect the specified rectangle More...
 
QList< QgsFeatureIdnearestNeighbor (QgsPoint point, int neighbors) const
 returns nearest neighbors (their count is specified by second parameter) More...
 
int refs () const
 get reference count - just for debugging! More...
 

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: