[QGIS-Developer] PSA: do NOT build QGIS with libspatialindex >= 2.0
Nyall Dawson
nyall.dawson at gmail.com
Mon Sep 15 17:37:43 PDT 2025
Hi list,
While tracking down the failures from
https://github.com/qgis/QGIS/pull/63180, it's revealed that using QGIS with
libspatialindex >= 2.0 gives completely misleading results for nearest
neighbour geometry searches.
The root cause is an optimisation from the upstream library (
https://github.com/libspatialindex/libspatialindex/commit/6fe9ff769243579ed74f7f27409dd1dda6591634)
that breaks how downstream clients could previously implement custom
nearest neighbour comparators. From my research I don't think this is
fixable in QGIS, and will need an upstream fix.
In the meantime, any QGIS build with libspatialindex >= 2 will be silently
broken and give COMPLETELY INCORRECT results for anything based on a
nearest neighbour query.
This also affects downstream clients like QField/mergin.
Do NOT use in production -- you have been warned!!
Nyall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250916/01dba68b/attachment.htm>
More information about the QGIS-Developer
mailing list