QGIS/python/core/qgsspatialindex.sip
2017-05-22 10:12:08 +02:00

97 lines
2.3 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsspatialindex.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSpatialIndex
{
%TypeHeaderCode
#include "qgsspatialindex.h"
%End
public:
QgsSpatialIndex();
%Docstring
Constructor - creates R-tree
%End
explicit QgsSpatialIndex( const QgsFeatureIterator &fi );
%Docstring
Constructor - creates R-tree and bulk loads it with features from the iterator.
This is much faster approach than creating an empty index and then inserting features one by one.
.. versionadded:: 2.8
%End
QgsSpatialIndex( const QgsSpatialIndex &other );
%Docstring
Copy constructor
%End
~QgsSpatialIndex();
%Docstring
Destructor finalizes work with spatial index
%End
bool insertFeature( const QgsFeature &f );
%Docstring
Add feature to index
:rtype: bool
%End
bool deleteFeature( const QgsFeature &f );
%Docstring
Remove feature from index
:rtype: bool
%End
QList<QgsFeatureId> intersects( const QgsRectangle &rect ) const;
%Docstring
Returns features that intersect the specified rectangle
:rtype: list of QgsFeatureId
%End
QList<QgsFeatureId> nearestNeighbor( const QgsPoint &point, int neighbors ) const;
%Docstring
Returns nearest neighbors (their count is specified by second parameter)
:rtype: list of QgsFeatureId
%End
int refs() const;
%Docstring
get reference count - just for debugging!
:rtype: QAtomicInt
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsspatialindex.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/