Finland's places dedupe tiebreaks on font size, demoting 36 clusters a tier #93
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#93
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
#80 (PR #90) added a spatial dedupe to Finland's
placesquery: cluster by normalized name, thenDISTINCT ON (name, cl)to pick one row per cluster. The pick is ordered— i.e. it tiebreaks on font size, and
importanceis then read off whichever row won. But thetiers' font ranges overlap:
48130 reaches 220 where 48120 starts at 200, so a hamlet row can outrank the village row in its
own cluster and the cluster imports one tier lower than the register says.
Scope
36 clusters, all of them 2 → 1 (village demoted to hamlet). No importance-3 city is affected —
the 48111/48112 floor of 330 sits above 48120's ceiling of 375 only partially, but empirically no
top-tier cluster loses. Sample: Åkö, Annala, Fröjdö, Haikari, Hietaranta, Isomäki, Kurkimäki,
Liuksiala — all minor places, which is why this did not hold up the #80 merge.
Reproduce by rebuilding the inner cluster step and comparing the chosen row's tier against
max(importance)over the cluster.What to do
Order the tiebreak on the importance tier before the font size, so the cluster is represented by
its highest tier and
kirjasinkokoonly breaks ties within a tier:The importance CASE is already written twice in that query; worth hoisting it into the innermost
subquery so the ordering and the emitted column cannot drift apart.
Acceptance
Zero clusters where the selected row's tier is below the cluster's maximum. Row count unchanged
(267 812) — this changes which row represents a cluster, not how many clusters there are. The z5
top-4 and the per-zoom
rank <= Nbudgets should be unaffected; confirm the R85 query stillreturns the same order.
Note
Language preference stays ahead of the tier deliberately: that is the R92 collapse, and demoting
it below the tier would let a Swedish top-tier row beat the Finnish name for the same place.
Found reviewing PR #90.
Result is in #126 — #126; the review note is the PR description.