QGIS/python/core/qgsspatialindex.sip

54 lines
1.3 KiB
Plaintext
Raw Normal View History

class QgsSpatialIndex
{
%TypeHeaderCode
#include "qgsspatialindex.h"
%End
public:
/* creation of spatial index */
/** constructor - creates R-tree */
QgsSpatialIndex();
/** copy constructor */
QgsSpatialIndex( const QgsSpatialIndex& other );
/** destructor finalizes work with spatial index */
~QgsSpatialIndex();
/** implement assignment operator */
2014-05-27 23:22:50 +02:00
// QgsSpatialIndex& operator=( const QgsSpatialIndex& other );
/* operations */
/** add feature to index */
bool insertFeature( const QgsFeature& f );
/** remove feature from index */
bool deleteFeature( const QgsFeature& f );
/* queries */
/** returns features that intersect the specified rectangle */
QList<qint64> intersects( QgsRectangle rect ) const;
/** returns nearest neighbors (their count is specified by second parameter) */
QList<qint64> nearestNeighbor( QgsPoint point, int neighbors ) const;
2014-05-27 23:22:50 +02:00
/* debugging */
//! get reference count - just for debugging!
int refs() const;
protected:
2014-05-27 23:22:50 +02:00
// @note not available in python bindings
// static SpatialIndex::Region rectToRegion( QgsRectangle rect );
2014-05-27 23:22:50 +02:00
// @note not available in python bindings
// bool featureInfo( const QgsFeature& f, SpatialIndex::Region& r, QgsFeatureId &id );
};