18 #ifndef QGSSPATIALINDEXKDBUSH_PRIVATE_H
19 #define QGSSPATIALINDEXKDBUSH_PRIVATE_H
45 class PointXYKDBush :
public kdbush::KDBush< std::pair<double, double>, QgsSpatialIndexKDBushData, std::size_t >
51 fillFromIterator( fi, feedback, callback );
58 fillFromIterator( it, feedback,
nullptr );
71 if ( callback && !( *callback )( f ) )
94 sortKD( 0, size - 1, 0 );
97 std::size_t size()
const
104 class QgsSpatialIndexKDBushPrivate
109 : index( std::make_unique < PointXYKDBush >( fi, feedback ) )
113 : index( std::make_unique < PointXYKDBush >( source, feedback ) )
117 : index( std::make_unique < PointXYKDBush >( fi, feedback, &callback ) )
121 std::unique_ptr< PointXYKDBush > index;
Wrapper for iterator of features from vector data provider or vector layer.
bool nextFeature(QgsFeature &f)
This class wraps a request for features to a vector layer (or directly its vector data provider).
An interface for objects which provide features via a getFeatures method.
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const =0
Returns an iterator for the features in the source.
virtual long long featureCount() const =0
Returns the number of features contained in the source, or -1 if the feature count is unknown.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
Base class for feedback objects to be used for cancellation of something running in a worker thread.
bool isCanceled() const SIP_HOLDGIL
Tells whether the operation has been canceled already.
const QgsAbstractGeometry * constGet() const SIP_HOLDGIL
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns type of the geometry as a WKB type (point / linestring / polygon etc.)
Point geometry type, with support for z-dimension and m-values.
A container for data stored inside a QgsSpatialIndexKDBush index.
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.