Greece places: settlements + islands (the archipelago requirement) — #44/#171 #190
No reviewers
Labels
No labels
blocked
claude-wip
map-report
map:is
map:se
needs-review
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
art/ismap!190
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "gr-places"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reference: the
placesrow of the Greece catalogue (docs/country-gr.md, "Places"), under the #44/#171 pilot. No dedicated issue — this is the catalogue row's "worth it" verdict delivered, plus the user requirement that Greece's ISLANDS be labeled with high priority (no previous country has an archipelago; Κρήτη must be among the last labels standing at z4–z6).What lands
Greece's partition of the shared
placescontract (stop_z 4, maxz 14, filter_only, attrs geom/name/importance/rank, rank mvt_excluded): 13 547 settlements + 30 island labels, one total rank ladder, per-zoom label budget, 7 acceptance tests on the layer. The style needs no change — importance is the style's own ladder.Sources (both official, non-OSM, already in this config's pipeline)
oikismoi(ELSTAT census settlement set, 13 548 points,kalcode/oikismos/top_koin) joined to ELSTAT's census populations on the 10-digit Kallikratis code.perifereiakes_enotites(75 regional units) +kallikratikoi_dimoi(325 municipalities) +perifereies(13 regions), all from the same ΥΠΕΝ WFS workspace.The 2011-vs-2021 population decision
The join uses ELSTAT's 2011-codification file ("Απογραφές πληθυσμού 1991,2001,2011" — the catalogue's SAM03 row), 100% join coverage (13 547/13 547). The 2021 file (MON_PLI_DHM_OIKISN_2021.xlsx) uses the post-2019 municipal codification: it joins only 89.2% of the codes and would silently demote real towns (Αίγινα 6 867, Σιάτιστα 5 490, Σπέτσαι 4 001) to importance 1 — rejected. The 2011 file is binary .xls; the obvious Go library (extrame/xls) misparses its shared-string table (measured: every string cell after the first ~8 kB comes back empty), so the importer gains a minimal BIFF8 reader (importer/xls.go, on extrame/ole2 + x/text's cp1253), tested against a checked-in xlwt fixture and the real file (20 991 rows, 13 554 level-8 rows, Greek strings intact). The staging machinery gains a tabular (no-geometry) table path.
The island mechanism
Geometric, over the admin division: clip every regional unit to the national land outline, then a unit whose land shares no boundary ≥ 1 km with any other unit's land is an island unit (the band is empty: 25 units at 0 m, the smallest real land border is Άγιο Όρος's 8.9 km). The land outline must be the GeoJSON vintage of
perifereies— the GML one the mask uses shares no linework with the GeoJSON units (measured). Εύβοια is added explicitly (only land connection: the ~40 m Chalkida bridge; its unit shares the gulf-midline sea boundary with Βοιωτία, which the source does not distinguish from land). The two group-named units (Σποράδες, Κέας-Κύθνου) label their island municipalities (Σκιάθος — the user's required below-unit island — Σκόπελος, Αλόννησος, Κέα, Κύθνος). Κρήτη comes from the region-level test (sea-separated region whose largest landmass holds ≥ 90% of its land — only Περιφέρεια Κρήτης qualifies at 99.5%). Result: 30 island labels at the centroid of each unit's largest landmass, names via a documented genitive→nominative mapping of the ALL-CAPS administrative forms (ΡΟΔΟΥ → Ρόδος; Θήρα is the official name of Σαντορίνη, Κεφαλονιά the common form of Κεφαλληνία). Islands below the unit level (Σκύρος, Παξοί, Σαλαμίνα, Ίος…) are out of scope — their towns are labeled by the settlements feed. The acceptance tests pin the exact 30-name set and the 15 required islands' ranks.The rank ladder (the deliberate choice)
One total order:
ROW_NUMBER() OVER (ORDER BY importance DESC, size DESC, name); settlements' size = 2011 population, islands' size = area km² × 70 (a round constant just below the ~82 residents/km² average density, chosen so no island outranks the capital — at the true density Κρήτη would beat Αθήναι and break R85). The ladder reads Αθήναι (1), Κρήτη (2), Θεσσαλονίκη (3), Εύβοια (4), then cities and islands interleaved by size. Importance: 8 cities ≥ 100k / 136 towns ≥ 10k / villages; the requirement's 15 islands at 3, the rest at 2.The budget choice
X = 65% instead of the 60% default, argued in the config comment: at 60% the z5 cap floors to 1 label over Greece's 132 029 km² (the R34 land reference) and the country view would show only the capital; 65% is the smallest round value whose caps admit Κρήτη at z5 (N = 2) and both big islands at z6 (N = 8). Caps: z4 ≤ 1, z5 ≤ 2, z6 ≤ 8, z7 ≤ 33, z8 ≤ 132, z9 ≤ 531, z10 ≤ 2127, z11 ≤ 8510, z12 ≤ 34040 — all recomputed from the formula, no literal overrides (R33/R84). z4 shows Αθήναι alone (the capital is the last name standing, R85); z5 shows Αθήναι + Κρήτη; z6 adds Θεσσαλονίκη, Εύβοια, Πάτραι, Πειραιεύς, Λάρισα, Ηράκλειον; z7 admits all 15 required islands (Σκιάθος is rank 23).
Verification (live DB)
importer acceptance --acceptance all conf/gr: 45/45 passed (7 new layer tests incl. the island requirements + the shared R85/R83 cross-country tests with 5 countries);conf/fiacceptance 49/49 (no regressions).importer tiles --check conf/gr: 32/32 PASS (places tiles carry exactlyname,importance,country—rankmvt-excluded).Stacked on the unmerged sibling PR #189 (gr-roads-rail-waterways) — do not merge independently.