forked from MapComplete/MapComplete
Themes(GRB): fix detection of overlapping buildings
This commit is contained in:
parent
915b732204
commit
6bdda9fb12
9 changed files with 34 additions and 184 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue