[core] fix deduping rings in querying, #11357
This commit is contained in:
committed by
Chris Loer
parent
963dd5e567
commit
750734df34
@@ -25,13 +25,14 @@ void FeatureIndex::insert(const GeometryCollection& geometries,
|
||||
std::size_t index,
|
||||
const std::string& sourceLayerName,
|
||||
const std::string& bucketLeaderID) {
|
||||
auto featureSortIndex = sortIndex++;
|
||||
for (const auto& ring : geometries) {
|
||||
auto envelope = mapbox::geometry::envelope(ring);
|
||||
if (envelope.min.x < util::EXTENT &&
|
||||
envelope.min.y < util::EXTENT &&
|
||||
envelope.max.x >= 0 &&
|
||||
envelope.max.y >= 0) {
|
||||
grid.insert(IndexedSubfeature(index, sourceLayerName, bucketLeaderID, sortIndex++),
|
||||
grid.insert(IndexedSubfeature(index, sourceLayerName, bucketLeaderID, featureSortIndex++),
|
||||
{convertPoint<float>(envelope.min), convertPoint<float>(envelope.max)});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user