From 7b72da8064b0b3ac4a868a0b9c65e3fdcfa472cf Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Fri, 14 Jun 2024 09:45:51 +0200 Subject: [PATCH] Chore: don't use 'reverse', fix tests --- scripts/GenerateSeries.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/GenerateSeries.ts b/scripts/GenerateSeries.ts index 9ed02a2156..a505c84a0c 100644 --- a/scripts/GenerateSeries.ts +++ b/scripts/GenerateSeries.ts @@ -272,8 +272,9 @@ class GenerateSeries extends Script { allFeatures = allFeatures.filter((f) => f.properties.metadata?.theme !== "EMPTY CS" && f.geometry.coordinates.length > 0) const centerpointsAll = allFeatures.map((f) => { const centerpoint = GeoOperations.centerpoint(f) + const c = centerpoint.geometry.coordinates // OsmCha doesn't adhere to the Geojson standard and uses `lat` `lon` as coordinates instead of `lon`, `lat` - centerpoint.geometry.coordinates.reverse() + centerpoint.geometry.coordinates = [c[1], c[0]] return centerpoint }) const centerpoints = centerpointsAll.filter(p => {