mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9605 c8812cc2-4d05-0410-92ff-de0c093fc19c
45 lines
939 B
Plaintext
45 lines
939 B
Plaintext
|
|
class QgsSpatialIndex
|
|
{
|
|
%TypeHeaderCode
|
|
#include "qgsspatialindex.h"
|
|
%End
|
|
|
|
public:
|
|
|
|
/* creation of spatial index */
|
|
|
|
/** create new spatial index that will be stored in memory */
|
|
//static QgsSpatialIndex* createMemoryIndex();
|
|
|
|
/** create new spatial index that stores its data on disk */
|
|
//static QgsSpatialIndex* createDiskIndex(QString fileName);
|
|
|
|
/** constructor - creates R-tree */
|
|
QgsSpatialIndex();
|
|
|
|
/** destructor finalizes work with spatial index */
|
|
~QgsSpatialIndex();
|
|
|
|
|
|
/* operations */
|
|
|
|
/** add feature to index */
|
|
bool insertFeature(QgsFeature& f);
|
|
|
|
/** remove feature from index */
|
|
bool deleteFeature(QgsFeature& f);
|
|
|
|
|
|
/* queries */
|
|
|
|
/** returns features that intersect the specified rectangle */
|
|
QList<int> intersects(QgsRectangle rect);
|
|
|
|
/** returns nearest neighbors (their count is specified by second parameter) */
|
|
QList<int> nearestNeighbor(QgsPoint point, int neighbors);
|
|
|
|
|
|
};
|
|
|