26 : d( new QgsSpatialIndexKDBushPrivate( fi, feedback ) )
32 : d( new QgsSpatialIndexKDBushPrivate( source, feedback ) )
38 : d( new QgsSpatialIndexKDBushPrivate( fi, callback, feedback ) )
45 : d( new QgsSpatialIndexKDBushPrivate() )
58 if ( !d->ref.deref() )
71 if ( !d->ref.deref() )
87 if ( !d->index->finalized )
90 QList<QgsSpatialIndexKDBushData> result;
97 if ( !d->index->finalized )
100 d->index->within( point.
x(), point.
y(), radius, visitor );
105 return d->index->size();
110 if ( !d->index->finalized )
113 QList<QgsSpatialIndexKDBushData> result;
114 d->index->range( rectangle.
xMinimum(),
123 if ( !d->index->finalized )
126 d->index->range( rectangle.
xMinimum(),
Wrapper for iterator of features from vector data provider or vector layer.
An interface for objects which provide features via a getFeatures method.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
A rectangle specified with double values.
A container for data stored inside a QgsSpatialIndexKDBush index.
QgsSpatialIndexKDBush()
Constructs an empty index.
void finalize()
Finalizes the index after manually adding features.
QgsSpatialIndexKDBush(QgsFeatureIterator &fi, QgsFeedback *feedback=nullptr)
Constructor - creates KDBush index and bulk loads it with features from the iterator.
qgssize size() const
Returns the size of the index, i.e.
QList< QgsSpatialIndexKDBushData > intersects(const QgsRectangle &rectangle) const
Returns the list of features which fall within the specified rectangle.
bool addFeature(QgsFeatureId id, const QgsPointXY &point)
Adds a single feature to the index.
QgsSpatialIndexKDBush & operator=(const QgsSpatialIndexKDBush &other)
QList< QgsSpatialIndexKDBushData > within(const QgsPointXY &point, double radius) const
Returns the list of features which are within the given search radius of point.
unsigned long long qgssize
Qgssize is used instead of size_t, because size_t is stdlib type, unknown by SIP, and it would be har...
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features