Smooth jagged sub-national region boundaries (v0.16.0) #30

Merged
kamilkrzywda merged 1 commits from feat/smooth-regions into master 2026-10-13 11:53:59 +02:00
Owner

Part of #16

Adds a Douglas-Peucker vertex-thinning pass (scripts/smooth-regions.mjs, npm smooth:regions, ~50 m tolerance) to the sub-national choropleth.

  • 542 / 1,796 regions cleaned (−0.64% of vertices); file 2.30 → 2.29 MB.
  • The named Kočevje (SI) & Kavadarci (MK) plus the Balkan borderland are the worst cases; their remaining "mess" is fragmentation (many small disjoint parts), which a no-topology-change smoothing does not merge.
  • 1,796 regions / all 177 countries / id+name+parent unchanged; KZ-KZY lake + all 83 islands preserved; parts/rings unchanged (no topology change); idempotent (re-run → byte-identical).
  • Map + LLM contract untouched (WorldMap.tsx resolves owner via properties.parent).

Part of #16 (the LLM sub-region-transfer piece remains).

Part of #16 Adds a **Douglas-Peucker vertex-thinning** pass (`scripts/smooth-regions.mjs`, npm `smooth:regions`, ~50 m tolerance) to the sub-national choropleth. - **542 / 1,796** regions cleaned (−0.64% of vertices); file 2.30 → 2.29 MB. - The named **Kočevje (SI)** & **Kavadarci (MK)** plus the **Balkan borderland** are the worst cases; their remaining "mess" is *fragmentation* (many small disjoint parts), which a no-topology-change smoothing does not merge. - **1,796 regions / all 177 countries / id+name+parent unchanged**; **KZ-KZY lake + all 83 islands preserved**; parts/rings unchanged (no topology change); **idempotent** (re-run → byte-identical). - Map + LLM contract untouched (`WorldMap.tsx` resolves owner via `properties.parent`). Part of #16 (the LLM sub-region-transfer piece remains).
kamilkrzywda added 1 commit 2026-10-13 11:50:25 +02:00
Smooth jagged sub-national region boundaries (v0.16.0)
CI / build + unit + e2e (pull_request) Successful in 2m18s
f1cc4fbc10
Part of #16
kamilkrzywda scheduled this pull request to auto merge when all checks succeed 2026-10-13 11:53:57 +02:00
kamilkrzywda merged commit e92bf47d7d into master 2026-10-13 11:53:59 +02:00
kamilkrzywda deleted branch feat/smooth-regions 2026-10-13 11:53:59 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/History#30