Chore: housekeeping

This commit is contained in:
Pieter Vander Vennet 2025-06-19 21:55:28 +02:00
parent 4c001d718e
commit 6f7d94890a
29 changed files with 430 additions and 308 deletions

View file

@ -159,12 +159,9 @@ export default class OsmFeatureSource extends FeatureSourceMerger {
const osmJson = await Utils.downloadJsonCached(url, 2000)
try {
this.options?.fullNodeDatabase?.handleOsmJson(osmJson, z, x, y)
let features = <Feature<any, { id: string }>[]>OsmToGeoJson(
osmJson,
{
flatProperties: true,
}
).features
let features = <Feature<any, { id: string }>[]>OsmToGeoJson(osmJson, {
flatProperties: true,
}).features
// The geojson contains _all_ features at the given location
// We only keep what is needed
@ -174,7 +171,7 @@ export default class OsmFeatureSource extends FeatureSourceMerger {
)
for (let i = 0; i < features.length; i++) {
features[i] = await this.patchIncompleteRelations(features[i], <any> osmJson)
features[i] = await this.patchIncompleteRelations(features[i], <any>osmJson)
}
features = Utils.NoNull(features)
features.forEach((f) => {