Finland's place register ships its top tier in capitals, and duplicates it cased #80

Closed
opened 2026-08-09 10:35:58 +00:00 by art-bot · 1 comment
Collaborator

Found auditing every country against docs/country-requirements.md (#77). Violates R94 (normalize to the register's display casing) and R90 (same-name dedupe must be spatial).

What the data says

Finland's top-tier place names are in capitals, and the same cities also exist cased:

z5 labels fi -> FORSSA, HANKO, HEINOLA, HELSINKI
SELECT name, importance, rank FROM map_places_14 WHERE country='fi' AND upper(name)='HELSINKI';
  HELSINKI | 3 | 4
  Helsinki | 2 | 521

So Helsinki is in the register twice under two casings and two importance tiers. The map shouts its biggest cities and whispers them again beside themselves.

Why

fi_paikannimi kohdeluokka 48111/48112 (importance 3) and 48120 (importance 2) are different label series of the same register, and the coarser series stores its text in capitals. The DISTINCT ON (ST_X(geom), ST_Y(geom)) dedupe in conf/fimap.yaml only collapses rows at identical coordinates, so the two series' points — which are near each other but not identical — both survive.

The fix

Normalize casing on the way in, and make the dedupe spatial rather than coordinate-exact, per R90: cluster per name with a small eps and keep one row. Note R79 — state the eps in ground metres, since 3857 units at 60°N are about half a metre each.

Take care not to over-collapse: Finland is bilingual, and DISTINCT ON with Finnish preferred is already doing real work on VAASA/VASA and HELSINKI/HELSINGFORS (R92). The casing fix must not undo the language fix.

Acceptance

SELECT count(*) FROM map_places_14 WHERE country='fi' AND name = upper(name) AND length(name) > 3 is 0, and no city appears twice within a few hundred metres of itself.

Found auditing every country against `docs/country-requirements.md` (#77). Violates **R94** (normalize to the register's display casing) and **R90** (same-name dedupe must be spatial). ## What the data says Finland's top-tier place names are in capitals, and the same cities also exist cased: ``` z5 labels fi -> FORSSA, HANKO, HEINOLA, HELSINKI SELECT name, importance, rank FROM map_places_14 WHERE country='fi' AND upper(name)='HELSINKI'; HELSINKI | 3 | 4 Helsinki | 2 | 521 ``` So Helsinki is in the register twice under two casings and two importance tiers. The map shouts its biggest cities and whispers them again beside themselves. ## Why `fi_paikannimi` `kohdeluokka` 48111/48112 (importance 3) and 48120 (importance 2) are different label series of the same register, and the coarser series stores its text in capitals. The `DISTINCT ON (ST_X(geom), ST_Y(geom))` dedupe in `conf/fimap.yaml` only collapses rows at *identical* coordinates, so the two series' points — which are near each other but not identical — both survive. ## The fix Normalize casing on the way in, and make the dedupe spatial rather than coordinate-exact, per **R90**: cluster per name with a small `eps` and keep one row. Note **R79** — state the eps in ground metres, since 3857 units at 60°N are about half a metre each. Take care not to over-collapse: Finland is bilingual, and `DISTINCT ON` with Finnish preferred is already doing real work on VAASA/VASA and HELSINKI/HELSINGFORS (**R92**). The casing fix must not undo the language fix. ## Acceptance `SELECT count(*) FROM map_places_14 WHERE country='fi' AND name = upper(name) AND length(name) > 3` is 0, and no city appears twice within a few hundred metres of itself.
Owner

Result is in #90 — #90; the review note is the PR description.

Result is in #90 — https://git.blahonga.org/art/ismap/pulls/90; the review note is the PR description.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
art/ismap#80
No description provided.