#93: places dedupe picks the cluster's highest register tier before font size #126
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!126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-93-places-dedupe-tier"
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 #93
#93 — Finland's places dedupe tiebreaks on the register tier before font size
What changed
One query,
conf/fimap.yaml'splaceslayer, and its acceptance tests.The
(name, cl)cluster pick ordered on(kielikoodi = 'fin')thenkirjasinkoko, andimportancewas read off whichever row won. The tiers'font ranges overlap (48120 reaches 200 where 48130 starts at 160 and goes
to 220), so a hamlet row could outrank the village in its own cluster and
import the cluster one tier lower than the register says — 36 clusters, all
2 → 1 (reproduced: the old pick left 36 clusters whose chosen row's tier sat
below the cluster max, every one a village demoted to hamlet).
(name, cl)ORDER BY is now(kielikoodi = 'fin') DESC, importance DESC, kirjasinkoko DESC NULLS LAST—the cluster is represented by its highest tier, and font size only breaks
ties within a tier. Language preference stays ahead of the tier (R92): a
Swedish top-tier row must not beat the Finnish name for the same place.
as a column, so the ordering and the emitted column are the same expression
and cannot drift apart (it was written twice — once in the ORDER BY, once
in the select list).
Verification (live DB,
placeslayer reimported)This is now a permanent acceptance test on the layer — "R85/R92: no (name,
cl) cluster is represented below its highest register tier" — which rebuilds
the pick exactly as the query does. On the old order it reports the 36
demoted clusters; on the new order it passes.
fixed clusters picked their village rows, and one of those rows landed on an
occupied point: Oitbacka (Swedish) and Oitmäki (Finnish) are the two
names of the same Kirkkonummi village, both now at tier 2 with font 200 at
the same coordinate. The coordinate dedupe keeps the Finnish name (R92), so
the map shows one correct label instead of a correct tier-2 label plus a
demoted tier-1 twin at a second point. The issue's "unchanged count"
assumption missed this same-place pair; the drop is the fix working.
Tampere, Oulu (the existing R85 test passes).
z9=1129, z10=4519, z11=18076, z12=72305 — each exactly the configured cap.
importance: 2, tile keys arename/importance/country—rankstaysexcluded (R83's manual half, still no test — #125).
Isomäki, Kurkimäki, Liuksiala) now appear at importance 2.
Acceptance tallies (
make acceptance-all, after the reimport)Left undone
Nothing. The count-shift story above is the only place the issue's
expectations differed from what the data does; the durable property — no
cluster represented below its highest tier — is what the new test pins.