#64: transit design — unique_icon stations, network-specific badge sprites, docs #65
No reviewers
Labels
No labels
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!65
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-64-transit-design"
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?
Transit design — first tranche: the
unique_iconmechanism, docs, and the icon renamesIssue #64 overrides the per-city transit issues (#24/#25/#38/#63): the design was
missing while the details were being micromanaged. This PR lands the design's
cross-country backbone — the schema/style change every transit network will hang
off — plus the per-country transit documentation the issue asks for first. The heavy
per-country data expansion (importing every city's networks from national sources) is
the follow-up, documented at the bottom.
What the design says, and what this PR does
Icon selection is by
unique_icon, never bymode.modeonly saysmetro/tram/commuter; a network's iconic symbol is a property of that network.
The shared
stationscontract gains a nullableunique_icontext column(
conf/common.yaml); the style'sstation_iconslayer now filters["has", "unique_icon"]and selectsicon-image: ["get", "unique_icon"], andstation_dotsrenders anything without one (html/style.json). A station withno symbol renders as the plain dot, which is the correct default for tram,
heavy rail, and any network that has no logotype.
Sprite names are network-specific, not mode labels. The Stockholm badges are
renamed
metro→stockholm-metro(the T) andcommuter→stockholm-commuter(the J), inmapsrv/sprite.goand the SVG filesthemselves (
mapsrv/icons/), withicons/README.mddocumenting the naming rule.This fixes the PR #50 bug the issue calls out: the style asked for a sprite
called
metrowhile the icon wasrail-metro, and the mode-based selectioncould never scale past two networks. A future badge (e.g.
warszawa-metro) joinsthe list under its own name with no style change.
SE populates it; PL/FI deliberately don't. Sweden's stations query emits
stockholm-metro/stockholm-commuterfor its metro and pendeltåg stops(
conf/semap.yaml); Poland's tram stops and Finland's railway traffic sites emitNULL — no iconic symbol exists for them, and the issue says use the symbol only
when there is one. Reimported all three countries' stations partitions against
the live DB (the ALTER'd parent carries the new column through every partition).
Docs (the issue's point 4, and its "docs first" instruction)
docs/country-iceland.md— new Transit section: nothing exists (no rail, nometro/tram/funicular; Strætó buses are out of the issue's scope) — the "write it
down even when there's nothing" case, done explicitly.
docs/country-sweden.md/docs/country-poland.md/docs/country-finland.md—the station-badge paragraphs now describe the
unique_iconscheme; the stale"sprite names equal the mode enum" and "M icon" claims are gone.
docs/style.md— the station-icon paragraph rewritten for the network-specificnaming;
docs/workstream-a.md— catalogue rows updated (se_gtfsrow now notesthe national feed covers Gothenburg/Norrköping/Malmö trams, PL work-list item 3
updated to the
unique_iconscheme).Verification (all against the live DB)
make build;go test ./...in importer/ and mapsrv/ — pass.gl-style-validate html/style.json— clean.stationsfor SE/PL/FI (single-layer import each; the SE GTFSstaging re-streams the feed). Live counts unchanged: SE 2059 (100 metro, 55
commuter, 309 tram, 1595 rail — all named), PL 324 tram, FI 559 (383 named;
the 176 unnamed are junctions/loops by the documented register rule).
unique_icondistribution inmap_stations_14_se: exactly 100stockholm-metro+ 55stockholm-commuter, 0 NULL-count; PL/FI 0 — as designed.unique_icon='stockholm-metro', tram/rail features none.station_iconsrenders the T badge (spriteLoaded: true, featureunique_icon='stockholm-metro'), tram/rail render as dots; local vision modelconfirms the dark-blue T badge at the station.
Left for the per-country delegation (the issue's own next step)
The issue says to delegate per country after the docs; the heavy data work this PR
does NOT do, now that the mechanism is in place:
stops exist only for Warszawa (ZTM). Per the capital + two biggest rule: Kraków
and Łódź GTFS feeds next; Warszawa metro badge (
warszawa-metro) when ZTM addsmetro to the feed; commuter reach question still open (#63).
(Digiroad) is the documented source, and no Finnish network has a logotype so
unique_iconstays NULL by design.in the country docs where relevant (Iceland's Transit section spells this out).
Follow-up on review: the station badges were wrong, and the #25 commit message lied about it. The "metro" sprite was Maki's generic rail-metro — a metro-car silhouette whose T-shaped window read as a T — and the "commuter" sprite was a box with an invisible J: the letter was a black stroke on a black fill, and the sprite pipeline's single-alpha tint flattened it to nothing. Neither was the symbol its name promised.
Both are now the actual network signs, public domain from Wikimedia Commons, rendered in their own colours (the pipeline gains a
coloredicon mode so brand marks are not tinted to one stationBlue):Verified against the live server: the sprite sheet carries both badges in their real colours, and a z16 browser check shows the T at Ropsten and the J at Skogås (queryRenderedFeatures + the local vision model, which describes exactly the white-disc-navy-T and grey-bars-black-J signs).