From f00c7c3cb67da8aa0c4770124d3ce8ea28cbc0ea Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 17 Dec 2024 16:18:32 +0100 Subject: [PATCH] Chore: Small tweaks to compare scripts, improve docs --- scripts/velopark/compare.ts | 9 +++++++-- scripts/velopark/veloParkToGeojson.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/velopark/compare.ts b/scripts/velopark/compare.ts index 0c16c2836..68fc12dc5 100644 --- a/scripts/velopark/compare.ts +++ b/scripts/velopark/compare.ts @@ -30,7 +30,7 @@ class Compare extends Script { Object.keys(osmParking.properties).concat(Object.keys(veloParking.properties)) ) for (const key of allKeys) { - if (["name", "numberOfLevels"].indexOf(key) >= 0) { + if (["name", "numberOfLevels", "id"].indexOf(key) >= 0) { continue // We don't care about these tags } if (osmParking.properties[key] === veloParking.properties[key]) { @@ -108,7 +108,12 @@ class Compare extends Script { distanceBins[bin] += 1 } - fs.writeFileSync("report_diff.json", JSON.stringify({ diffs, distanceBins }, null, " ")) + fs.writeFileSync("report_diff.json", JSON.stringify({ + diffs, + distanceBins, + binSize, + "#binsize": "Every bin increases with this amount in meter" + }, null, " ")) console.log("Written report_diff.json") } diff --git a/scripts/velopark/veloParkToGeojson.ts b/scripts/velopark/veloParkToGeojson.ts index 1887b5fa4..b1835b74d 100644 --- a/scripts/velopark/veloParkToGeojson.ts +++ b/scripts/velopark/veloParkToGeojson.ts @@ -256,7 +256,7 @@ class VeloParkToGeojson extends Script { VeloParkToGeojson.exportExtraAmenities(allVelopark) await VeloParkToGeojson.createDiff(allVelopark) console.log( - "Use vite-node scripts/velopark/compare.ts to compare the results and generate a diff file" + "Use \nvite-node scripts/velopark/compare.ts -- velopark_all_.geojson osm_with_velopark_link_.geojson\n to compare the results and generate a diff file" ) } }