Themes(GRB): fix detection of overlapping buildings

This commit is contained in:
Pieter Vander Vennet 2025-05-04 03:56:38 +02:00
parent 915b732204
commit 6bdda9fb12
9 changed files with 34 additions and 184 deletions

View file

@ -27,6 +27,19 @@ export default class GeoIndexedStore implements FeatureSource {
const bboxFeature = bbox.asGeojsonCached()
return this.features.data.filter((f) => GeoOperations.completelyWithin(f, bboxFeature))
}
/**
* Gets the current features within the given bbox.
*
* @param bbox
* @constructor
*/
public GetFeaturesProbablyOverlappingWith(bbox: BBox): Feature[] {
return this.features.data.filter((f) => {
const fBbox = BBox.get(f)
return fBbox.overlapsWith(bbox)
})
}
}
export class GeoIndexedStoreForLayer extends GeoIndexedStore implements FeatureSourceForLayer {