Chore: don't use 'reverse', fix tests

This commit is contained in:
Pieter Vander Vennet 2024-06-14 09:45:51 +02:00
parent 85cb90182b
commit 7b72da8064

View file

@ -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 => {