[QGIS-Developer] QgsSpatialIndex nearestNeighbor returns more than 1 feature

matteo matteo.ghetta at gmail.com
Wed Apr 28 08:55:36 PDT 2021


Hi all,

Using nearestNeighbor of QgsSpatialIndex, even with the flag 
FlagStoreFeatureGeometries, sometimes I got more than 1 feature related 
(distance between the features is not the same, I've manually checked).

Is there a way to return only the nearest feature?

Cheers and thanks

Matteo


More information about the QGIS-Developer mailing list