Place names for Finland and Iceland via a shared map_places layer (#29) #53
No reviewers
Labels
No labels
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!53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "night/issue-29-place-names"
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?
Closes #29
Issue #29 — Place names for Finland and Iceland
Closes #29 (depends on #16, whose catalogue drove the per-country decisions).
What was added
A shared
placeslayer (map_places_<z>, z4–14,geom point + name + importance 1–3), the minimal shape the issue floated: the surveys' name points dumped into thetile, and MapLibre's collision handling does the decluttering (
symbol-sort-keyonimportance in the style). No polygon/line-label machinery — that is the explicitly
deferred extension ("find a label and use it to name a whole network of rivers").
Iceland's old per-country
places(population polygons) was renamedsettlementsso the shared layer could take the name.
Finland — done (data was on disk)
MML
paikannimiregister, settlement classes 48111/48112 (towns, importance 3),48120 (villages, 2), 48130 (hamlets, 1); 48190 "other" excluded as noise. Bilingual
duplicates (VAASA/VASA at identical coordinates) deduped
DISTINCT ONthe point,Finnish preferred — the repo's established convention. 394 636 register rows →
269 826 points.
Iceland — done (fetch ran)
make fetch-namesfetched the LMÍ örnefni register (125 MB, 2026-07-02 edition) —the catalogue's "not on disk" item, now also declared in ismap.yaml
downloads:.Points only (44 506), importance from the örnefnaflokkur ladder (Stórt/Þéttbýli 3,
Mið/Sveit 2, Lítið 1). The register's lines/polygons (which carry the mid-size names)
stay unimported: they need label-anchor machinery, the deferred extension.
country-iceland.md's stale "örnefni fetched but not imported" is corrected.
Sweden — no partition, noted
No usable place-name source on disk: Sweden's örnefni-equivalent is the Topo 10
texttheme (the "points for place names" from the issue), which is not fetched.The contract comment and this note record it. Fetching the
texttheme is theSweden work item.
Poland — no partition, noted
No place-name points on disk: BDOT10k's 16 fetched classes carry names only on
features (water
NAZWA— already rendered — street names, rail line endpoints);GUGiK's PRNG register (behind
IDENTYFIKATORPRNG) is not fetched. Poland's waterwas already the only labelled water on the map. A PRNG fetch is the Poland work item.
Verification (numbers)
make build;go test ./...in importer/ and mapsrv/ — pass.-layer placesfor fimap.yaml and ismap.yaml — both clean atomic swaps.z11 17; z6/z5/z4 15 (imp 3 only).
zxy_map(10, 582, 296)(Helsinki) → layerplaces, 231 featureswith name/importance/country attributes (HELSINKI, ESPOO, KAUNIAINEN at imp 3);
zxy_map(12, 1798, 1088)(Reykjavík) → 43 örnefni names.gl-style-validate— clean (run twice, after the sort-key change).(VANTAA, HELSINKI, KAUNIAINEN, ESPOO render — after the sort-key fix);
z12: 59 (HELSINKI + districts); z14 rural: hamlets (Anttila, Pohjola…).
z14: small names; z6: 5 big names (Hlíð, Ísland, Hvammkot…).
symbol-sort-keyplaces lower values first — the documented "higher first" silently dropped the
cities behind the villages in dense views (0 of 3 city names rendered, 176
villages rendered). Fixed with
["-", ["get", "importance"]].Left undone
texttheme fetched (Geotorget orderextension; the same fetch that would name Sweden's water). Then it is a config-only
partition addition to the same shared layer.
polygons) need label-anchor machinery; separate issue territory.
register-level extension the catalogue lists; not this issue.
data/(gitignored); nothing to commit for it beyondthe
downloads:declaration.Review — #53 (shared places layer, issue #29)
Builds clean,
go vetandgo testpass. Finland's half is good; Iceland's needs workbefore this can merge.
Finland: good
1.17M register rows reduced to something renderable,
DISTINCT ON (ST_X, ST_Y)withFinnish preferred matches the convention the water and station queries already use, and
the
48190"other" exclusion is the right call. The tiers come out plausible — 308 /26 531 / 242 894 across importance 3 / 2 / 1 — and the
zoom_filtersladder lines up withthe style's
stepontext-size.The layer rename to
settlementsis complete:conf/ismap.yaml,conf/mapsrv.yaml,conf/world.yaml,html/style.jsonand the docs all move together, and there is nodangling reference to the old Iceland
placesanywhere in the tree.Iceland: the importance ladder is broken
11 % 10 = 1, so the first branch swallows 11 and the= 11clause in the second isunreachable. That is a plain logic bug independent of the data, but the imported result
says something more fundamental is off:
And the entire tier-3 set is:
Fifteen farms and rocks, plus the country itself. No Reykjavík, no Akureyri. Since
zoom_filterskeeps onlyimportance >= 3below z6 and>= 2below z11, andplace_labels(the settlements layer) does not start until z5, Iceland's z4 country viewlabels exactly those fifteen names and not one town.
The config comment also predicts 44 489 tier-1 points against the actual 44 530, which is
the tell that the assumed
ornefnaflokkurkennicoding is not the real one — theStórt/Mið/LítiðandÞéttbýli/Sveitvalues need reading off the actual GeoPackagerather than inferred from an
x1/x2/x3pattern. The file is not on this machine,so it needs
make fetch-namesto re-verify.Worth writing the check as an explicit value list once the codes are known, rather than
modular arithmetic — the
% 10trick is what made the collision possible and it will notsurvive the next code that does not fit the pattern.
Minor, once that is fixed
place_namesand Iceland'splace_labelsboth draw text and can both carry a name forthe same town. MapLibre's cross-layer collision will suppress one of them, but which one
is arbitrary; worth deciding deliberately, e.g. excluding the
Þéttbýliclasses from theIceland
placespartition sincesettlementsalready labels those.Note
The PR body's heading reads "Place names for Poland, Sweden and Finland" while the title
and the diff are Finland and Iceland. Stale header —
conf/plmap.yamlandconf/semap.yamlare untouched, which the shared-layer comment correctly explains as asupported state.
bec6c67960tob3c83033e8All review points addressed on
night/issue-29-place-names(rebased onto main; commitb3c8303).1. Iceland's importance ladder — fixed from the real data
The real
ornefnaflokkurkennicoding, read offdata/is_50v_ornefni_epsg_4326.gpkg, is a two-digit code: first digit = feature category (2 land, 3 sea, 4 water, 5 ice; 1 = settlements/rural), second digit = size (1 Stórt, 2 Mið, 3 Lítið), plus the settlement specials 10 = Þéttbýli and 11 = Sveit. The points table (ornefni_punktar, 44 506 rows) contains exactly:The ladder is now an explicit value list —
IN (21, 31, 41, 51) → 3,IN (11, 22, 32, 42, 52) → 2, else 1 — no modular arithmetic. New z14 distribution: is | 1 | 44 530, is | 2 | 2, is | 3 | 1. The old 44 530 − 44 489 tier-1 delta was 41 multipoint ST_Dump splits, not a coding error; the coding was wrong in a different way: the points table's only Stórt feature is Ísland itself (code 21,eyja), and the two Mið are Sundhnúkur and Kolbeinsey — the register's points carry no towns at all. That is what made the old tier-3 set fifteen farms/rocks plus the country name.2. z4 country view now labels actual towns — verified
Reykjavík and Akureyri are not örnefni points — they are code-10 (byggðarkjarni) polygons in
ornefni_flakarand live in the mannvirki settlements layer. Since the places partition excludes Þéttbýli, the settlements layer is now the town labeler and starts at z4 (stop_z: 4,place_labelsminzoom 4) instead of z5. Its z6 filter (population >= 4000) keeps Reykjavík (135 714), Kópavogur, Hafnarfjörður, Akureyri, Selfoss, Akranes and Vestmannaeyjar at the country view. Verified: decoded z4 tile (7/4) carries 23 settlement features including Reykjavík and Akureyri, and a real-browser CDP render at z4/z5 shows town labels (Akureyri, Selfoss, Akranes, Vestmannaeyjar, Ásbrú…) plus "Ísland" from the places layer.3. Þéttbýli exclusion — implemented
Code 10 (the 14 byggðarkjarni points — exactly the "fifteen farms and rocks" minus Ísland) is excluded from the Iceland places partition (
AND ornefnaflokkurkenni != 10), soplace_namesandplace_labelsno longer both carry the same town and MapLibre's cross-layer collision has nothing to arbitrate. The old tier-3 names survive only at importance 1 where the register genuinely holds small features of the same name (e.g. the many "Grásteinn" rocks, code 23).4. PR body heading — fixed
The stale "Place names for Poland, Sweden and Finland" heading is now "Place names for Finland and Iceland" (title, diff and body agree).
Verification summary
-layer places,settlements conf/ismap.yamlreimport: clean, atomic swaps; 44 492 source rows (44 506 − 14 excluded) + 41 splits.places= Ísland importance 3;settlements= 23 features with Reykjavík/Akureyri. z14 tile decodes names with importance intact.gl-style-validateclean; real-browser CDP render at z4/z5 confirms town labels.