QGIS/python/core/qgsspatialindex.sip
Nyall Dawson d8d17524b2 Make QgsSpatialIndex protected members private
The class is not designed to be subclassed
2017-06-01 10:09:09 +10:00

102 lines
2.5 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 insertFeature( QgsFeatureId id, const QgsRectangle &bounds );
%Docstring
Add a feature ``id`` to the index with a specified bounding box.
:return: true if feature was successfully added to index.
.. versionadded:: 3.0
: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
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsspatialindex.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/