Refactoring: fix metatagging

This commit is contained in:
Pieter Vander Vennet 2023-05-16 03:27:49 +02:00
parent 177697fe0a
commit 8fd3fbc0b7
34 changed files with 378 additions and 265 deletions

View file

@ -23,8 +23,7 @@ export default class GeoIndexedStore implements FeatureSource {
* @param bbox
* @constructor
*/
public GetFeaturesWithin(bbox: BBox, strict: boolean = false): Feature[] {
// TODO optimize
public GetFeaturesWithin(bbox: BBox): Feature[] {
const bboxFeature = bbox.asGeojsonCached()
return this.features.data.filter((f) => {
if (f.geometry.type === "Point") {
@ -40,7 +39,6 @@ export default class GeoIndexedStore implements FeatureSource {
if (f.geometry.type === "Polygon" || f.geometry.type === "MultiPolygon") {
return GeoOperations.intersect(f, bboxFeature) !== undefined
}
console.log("Calculating intersection between", bboxFeature, "and", f)
return GeoOperations.intersect(f, bboxFeature) !== undefined
})
}