feat(geo_map): world map at 50m (all sovereign states) + searchable region picker #740

Merged
raisondetredev merged 3 commits from refs/pull/740/head into main 2026-07-09 17:01:59 +02:00
raisondetredev commented 2026-07-09 15:58:02 +02:00 (Migrated from codeberg.org)

Parts #1 + #2 of the world-map upgrade: make small nations findable/reachable.

#2 — World map at 1:50m (204 sovereign states)

Rebuilt from Natural Earth 1:50m admin_0, filtered to sovereign states (TYPE in {Sovereign country, Country}) — 204 countries vs the old 1:110m set's 177, which dropped the micro-nations. Every one is now present: Maldives, Malta, Singapore, Monaco, Vatican, Nauru, Tuvalu, Kiribati, Marshall Islands, … Geometry simplified with Douglas–Peucker (~0.04°) + 3-decimal rounding; crucially, a feature that would collapse below a drawable ring keeps its largest ring unsimplified, so DP never erases a tiny nation. 561 KB (vs 173 KB at 110m — the cost of coverage + detail).

Each feature also carries a continent property (Natural Earth CONTINENT) — prep for the continent drill-down (part 3, being designed separately). The sovereign-state filter additionally fixed a duplicate-code bug that 50m exposed: Australia + its dependency territories share the AU ISO code, which would have broken region-by-code lookups; filtering to sovereign states drops the territories.

#1 — Searchable region picker

A pinpoint nation on a world map is unhuntable by tap but findable by name. MapRegionPickerScreen gains a search field + a prefix-ranked results overlay (matches on name and local name); picking a result selects it and enables confirmation. This is the reliable path to the micro-nations when authoring.

Tests

Registry test asserts 204 regions and the presence of the previously-dropped micro-nations (NR, TV, VA, FJ, MV). Picker test: search finds a micro-nation (Nauru) and selects it, is case-insensitive/prefix-ranked, and clears cleanly. Full suite green (4106 tests); analyzer clean.

On your Pacific question + what's next (part 3)

All the tiny Pacific nations survive at 50m, and search makes them reachable. The continent drill-down you proposed is being designed separately — it works cleanly for continental landmasses, but Oceania is a special case: it spans the full 360° and Fiji/Kiribati/New Zealand cross the antimeridian, so a naive "zoom to Oceania" gives no zoom and renders those countries split. That needs a Pacific-centered projection. Details + a design question are in the conversation.

Parts #1 + #2 of the world-map upgrade: make small nations findable/reachable. ### #2 — World map at 1:50m (204 sovereign states) Rebuilt from Natural Earth **1:50m** admin_0, filtered to sovereign states (`TYPE` in {`Sovereign country`, `Country`}) — **204 countries** vs the old 1:110m set's 177, which dropped the micro-nations. Every one is now present: Maldives, Malta, Singapore, Monaco, Vatican, Nauru, Tuvalu, Kiribati, Marshall Islands, … Geometry simplified with **Douglas–Peucker (~0.04°)** + 3-decimal rounding; crucially, a feature that would collapse below a drawable ring keeps its largest ring **unsimplified**, so DP never erases a tiny nation. **561 KB** (vs 173 KB at 110m — the cost of coverage + detail). Each feature also carries a `continent` property (Natural Earth `CONTINENT`) — prep for the continent drill-down (part 3, being designed separately). The sovereign-state filter additionally fixed a **duplicate-code bug** that 50m exposed: Australia + its dependency territories share the `AU` ISO code, which would have broken region-by-code lookups; filtering to sovereign states drops the territories. ### #1 — Searchable region picker A pinpoint nation on a world map is unhuntable by tap but findable by name. `MapRegionPickerScreen` gains a **search field + a prefix-ranked results overlay** (matches on name and local name); picking a result selects it and enables confirmation. This is the reliable path to the micro-nations when authoring. ### Tests Registry test asserts 204 regions and the presence of the previously-dropped micro-nations (`NR`, `TV`, `VA`, `FJ`, `MV`). Picker test: search finds a micro-nation (Nauru) and selects it, is case-insensitive/prefix-ranked, and clears cleanly. Full suite green (4106 tests); analyzer clean. ### On your Pacific question + what's next (part 3) All the tiny Pacific nations survive at 50m, and **search makes them reachable**. The continent drill-down you proposed is being designed separately — it works cleanly for continental landmasses, but **Oceania is a special case**: it spans the full 360° and Fiji/Kiribati/New Zealand cross the antimeridian, so a naive "zoom to Oceania" gives no zoom and renders those countries split. That needs a Pacific-centered projection. Details + a design question are in the conversation.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-learn!740
No description provided.