QGIS/python/core/qgsspatialindex.sip
Juergen E. Fischer c4c131ef75 sip sync
2014-05-27 23:32:42 +02:00

54 lines
1.3 KiB
Plaintext

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 */
// 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;
/* debugging */
//! get reference count - just for debugging!
int refs() const;
protected:
// @note not available in python bindings
// static SpatialIndex::Region rectToRegion( QgsRectangle rect );
// @note not available in python bindings
// bool featureInfo( const QgsFeature& f, SpatialIndex::Region& r, QgsFeatureId &id );
};