geo/spatialite: fix neighbour calculation in qgis

reverts a commit from 2.1, see
https://github.com/libspatialindex/libspatialindex/issues/276
This commit is contained in:
landry
2025-10-25 09:56:05 +00:00
parent 4d298f6381
commit 30e8080ef5
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -2,6 +2,7 @@ BROKEN-sparc64 = error: 'raise' was not declared in this scope
COMMENT = library for spatial indexing and querying
V = 2.1.0
REVISION = 0
DISTNAME = spatialindex-src-${V}
PKGNAME = ${DISTNAME:S/-src//}
CATEGORIES = geo
@@ -0,0 +1,14 @@
https://github.com/libspatialindex/libspatialindex/pull/277
Index: src/rtree/RTree.cc
--- src/rtree/RTree.cc.orig
+++ src/rtree/RTree.cc
@@ -613,7 +613,7 @@ double SpatialIndex::RTree::RTree::nearestNeighborQuer
Data* e = new Data(n->m_pDataLength[cChild], n->m_pData[cChild], *(n->m_ptrMBR[cChild]), n->m_pIdentifier[cChild]);
// we need to compare the query with the actual data entry here, so we call the
// appropriate getMinimumDistance method of NearestNeighborComparator.
- queue.push(NNEntry(n->m_pIdentifier[cChild], e, nnc.getMinimumDistance(query, e->m_region)));
+ queue.push(NNEntry(n->m_pIdentifier[cChild], e, nnc.getMinimumDistance(query, *e)));
}
else
{