Closes #69 #75
No reviewers
Labels
No labels
blocked
claude-wip
map-report
map:is
map:se
needs-review
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
art/ismap!75
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-69-metro-merge-transitive"
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 #69
Metro entrance merge is transitive — cluster group centroids with DBSCAN
The
metro_mergedCTE inconf/plmap.yamlcollapsed same-station entrancegroups by pairwise nearest-largest winner within 250 m. That relation is not
transitive: a chain of three groups (A–B and B–C under 250 m, A–C over) would
emit two stations — one named B but positioned at A's centroid, one named C
holding B's and C's entrances. A wrong name and a wrong position, worse than
the duplicate the merge exists to prevent.
The fix — replace the self-join with the same primitive the tram and rail
branches already use:
DBSCAN's transitive closure is exactly the "join all same-named points that are
near each other" semantics the recipe comment documents. minpoints 1 keeps every
group (singletons included), and the tie-break
nazwakeepsfirst_valuedeterministic. One fewer bespoke pattern in the file.
It does not fire on the current data — the issue is latent (39 groups → 38
stations, chain_broken 0) — but the recipe is documented as general, so the next
named-entrance source inherits the fix instead of the bug.
Verification (live DB, then a
-layer stationsreimport)and after, with identical name sets — all 39 group winners agree pairwise.
point is the centroid of all 13 entrances (distance 0.000).
float noise (
ST_Distance= 0.0000 in EPSG:3857) — GEOS collection scanorder, not a position change.
documented empty rung), z10/z11 3225, z12–z14 4052; no NULL names at z14
(metro 38 / tram 827 / rail 3187).
scripts/mvt-decode.py): 54 station features,27 metro, Wileński present.
console 404s are pre-existing (favicon, an ungenerated italic glyph) and
unrelated to this change.
go test ./...green inimporter/andmapsrv/.Notes for the reviewer
through the declared-downloads path) — the tram counts reflect current feeds,
a normal reimport side effect. Metro/rail come from BDOT10k, unchanged.
conf/plmap.yamlcomments anddocs/country-poland.mdupdated to describethe DBSCAN mechanism in place of the old "spatial join at 250 m".