fix(data): make the Norway datacenter script portable and re-runnable

Read and write files as UTF-8 with LF line endings so the script and
--verify work on Windows, where the default codec is cp1252 (thanks to
quanticsoul4772 for the report). Geofabrik keeps only its newest dated
extract, so --extract now defaults to the current one and accepts a dated
name for --verify while it is listed; the dataset README says so. Downloads
time out instead of hanging.
This commit is contained in:
Trygve Hemminghytt committed 2026-10-16 22:23:02 +02:00
1 parent 2e0d855cf8
commit 5b5d942d95
3 files changed
+42 -19

No files matched your search

+6 -2
View File
@@ -28,5 +28,9 @@ reflects OSM as of the extract below, everything else the original snapshot.
- Filter: `osmium tags-filter nwr/telecom=data_center nwr/building=data_center`
- Contact tags are dropped as above; unchanged features keep their original
line, so geometry is only rewritten when tags or vertices actually changed.
- Rebuild or check: `python3 scripts/build-datacenters-norway.py --cache <dir>`
(add `--verify` to check without writing; requires `osmium-tool`)
- Refresh: `python3 scripts/build-datacenters-norway.py --cache <dir>` uses
Geofabrik's current Norway extract and prints the dated name it used; record
that name, its OSM timestamp and MD5 here. Requires `osmium-tool`.
- Check: add `--extract <dated name> --verify` to compare without writing.
Geofabrik keeps only its newest dated extract, so a recorded extract can be
re-verified only while it is still listed; the MD5 above identifies it.