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

2021-04-29 Thread matteo
Thanks for the answer. I've some border cases (like perfect angles that determines a weird equal distance). Sorry for the noise and thanks for the hint Matteo ___ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info:

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

2021-04-28 Thread Nyall Dawson
On Thu, 29 Apr 2021 at 01:55, matteo wrote: > > 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

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

2021-04-28 Thread matteo
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