#64 per-country transit stops: Warsaw metro from BDOT10k OIKM_P (official, with badge), Kraków/Łódź tram, FI Digiroad tram #66

Merged
art merged 4 commits from night/issue-64-per-country-stops into main 2026-08-06 18:59:17 +00:00
Owner

#64 per-country transit stops: BDOT10k OIKM_P metro+rail, Kraków/Łódź tram feeds, Digiroad tram stops

Part of the #64 per-country delegation the transit-design PR (#65) left for the
follow-up. The Warsaw metro question that PR left open is answered here — the
official source was BDOT10k all along
— and the rest of the delegation's stop data
lands with it. #63 (commuter reach) stays open.

The metro, found

BDOT10k's OIKM_P class ("obiekt związany z komunikacją") carries the Warsaw metro
entrances
rodzaj = 'wejście do stacji metra', 258 of them in the Warsaw county,
named after their station (Bemowo ×10, Świętokrzyska ×13, …), survey-grade in
EPSG:2180. The class was always part of the national topographic database; the
Makefile's BDOT10K_CLASSES list simply never fetched it — the old "BDOT10k has no
stop point class at all" claim (and the "no official metro source" finding built on
it) was about the 16 fetched classes, not the delivery. This PR adds the class to the
fetch (with the marker bumped to pt-sw-sk-oikm so the done-state encodes the class
set), stages it (pl_oikm, all 380 counties), and gives the stations layer two new
branches:

  • Metro: entrances → one point per station. Entrances of one station share its
    name, so the name-grouped centroid is the station point (no DBSCAN — the
    Świętokrzyska ring spans 700+ m); entrance groups within 250 m of each other are
    one station under the modal name (Wileński's 12 entrances absorb the 13th,
    "Dworzec Wileński", instead of emitting two points 146 m apart). 38 named
    stations, the full M1+M2 network. kategoriaistnienia (BDOT10k's existence flag)
    excludes the under-construction M2 western-extension entrances — the unopened
    Lazurowa station draws no badge (6 unnamed + 4 named Lazurowa w budowie
    entrances; the flag is empty on some rows, so the predicate is IS DISTINCT FROM
    'nieczynny'/'w budowie'). importance 2 (the ordinary-station rung, same as
    Stockholm's metro) → z11.
  • Heavy rail: the same class's 'stacja lub przystanek kolejowy' kind, one
    point per named station nationally. Same-named stations in different places stay
    apart via ST_ClusterDBSCAN at 1 000 m PARTITION BY nazwa (the 150 m tram value
    would split a single big station — Warszawa Wschodnia's platform points span
    319 m; measured same-name pairs sit <500 m within one station and >1 km between
    different ones, so 1 000 m is the natural break). kategoriaistnienia excludes
    closed/unbuilt points (99 all-closed stations in the old output). 3 187 named
    stations nationally
    (mode NULL). importance 2, with the source's own
    halt/station signals (skrotkartograficzny 'st.'/'p. kol.', informacjadodatkowa
    PKP PLK note) examined and rejected — see docs/country-poland.md: they
    mis-grade the country's biggest stations (Białystok, Katowice, Poznań Główny and
    Gdynia Główna all carry the 'p. kol.' halt mark).

The warszawa-metro badge (issue #64) ships in this PR: the red M on a yellow disc
(public domain from Wikimedia Commons — PD-textlogo, the same tag as the Stockholm
symbols), sprite-registered under its network name, drawn by the style's
station_icons layer from z11. The SVG is normalized to the same disc size as the
Stockholm T and carries a proper viewBox.

The rest of the stop data

  • Tram stays on the three city GTFS feeds (Warszawa ZTM / Kraków ZTP / Łódź ZDiT —
    the ?download=1 query trick and the shared 150 m DBSCAN collapse as before). OIKM_P
    cannot replace them: its stop type is one value ('przystanek autobusowy lub
    tramwajowy') and track proximity cannot separate the two — validated: 91% of ALL
    Warsaw stops sit within 75 m of a tram line. GTFS route_type is the exact
    discriminator. The ~184k national bus/tram points OIKM_P also carries are
    documented as the source of a future national stop layer (the same idea as
    Finland's DR_PYSAKKI bus stops).
  • FI stations — the country's tram stops from Digiroad's DR_PYSAKKI (unchanged
    from the previous revision of this PR): the pysakit product, PYS_TYYPPI [1] =
    tram/light rail — 469 poles in Helsinki/Tampere/Raide-Jokeri → 288 stop points. The
    shapefile reader gained point support and fetch.go fetches shapefile siblings.

Verification (live DB, after the review round)

  • make build; go test ./... in importer/ and mapsrv/ — pass; configs parse
    through the real loader; git diff --check clean.
  • PL reimport: 4 052 rows in map_stations_14_pl = 3 187 rail / 827 tram / 38
    metro
    ; all 38 metro rows carry unique_icon = 'warszawa-metro'. Zoom filters per
    rung (tram z12, metro/rail z11).
  • Rail phantoms gone: Żabno, Zwierzyniec, Baranowo, Wierzchosławice (the review's
    spread >1 km groups) no longer collapse into a single midway point; the largest
    single-station spread (Narzym, 667 m) stays one station.
  • Closed/unbuilt stations gone: no output rail station consists entirely of
    nieczynny/w budowie points; the unopened Lazurowa M2 station is absent from the
    metro set.
  • Metro dedupe: Wileński + Dworzec Wileński → one Wileński point (verified 146 m
    apart before).
  • Decoded z13/z11 tiles over Warsaw: the stations layer carries
    name/mode/importance/unique_icon on every feature; metro features carry
    the warszawa-metro icon name.
  • Badge pixel-verified through the real pipeline: warszawa-metro renders its red M
    on the yellow disc at the same disc size as the Stockholm T (50 px vs 48 px at a
    60 px render, vs the previous ~59 px full-grid fill).

Docs

  • docs/country-poland.md — stations section rewritten: the three-rung table
    (metro + rail from OIKM_P, tram from GTFS), the corrected "no stop class" claim,
    the metro-entrance→station derivation (Lazurowa exclusion, Wileński merge), the
    rail DBSCAN eps and kategoriaistnienia reasoning, the halt/station importance
    rejection, and the national totals (3 187 rail / 38 metro, not "89 in the Warsaw
    county").
  • docs/country-finland.md — DR_PYSAKKI row + stations section (unchanged from the
    previous revision).
  • docs/workstream-a.md — the OIKM_P catalogue row (17 classes now), the corrected
    class count.
  • MakefileOIKM_P added to BDOT10K_CLASSES; BDOT10K_MARKER bumped to
    pt-sw-sk-oikm.
  • mapsrv/icons/README.md — three badges, Warsaw colours, no more hypotheticals.

This PR does not close #64 — the FI metro stops (HSL GTFS) and the commuter reach
question (#63) remain.

#64 per-country transit stops: BDOT10k OIKM_P metro+rail, Kraków/Łódź tram feeds, Digiroad tram stops Part of the #64 per-country delegation the transit-design PR (#65) left for the follow-up. The Warsaw metro question that PR left open is answered here — **the official source was BDOT10k all along** — and the rest of the delegation's stop data lands with it. #63 (commuter reach) stays open. ## The metro, found **BDOT10k's `OIKM_P` class ("obiekt związany z komunikacją") carries the Warsaw metro entrances** — `rodzaj = 'wejście do stacji metra'`, 258 of them in the Warsaw county, named after their station (Bemowo ×10, Świętokrzyska ×13, …), survey-grade in EPSG:2180. The class was always part of the national topographic database; the Makefile's `BDOT10K_CLASSES` list simply never fetched it — the old "BDOT10k has no stop point class at all" claim (and the "no official metro source" finding built on it) was about the 16 fetched classes, not the delivery. This PR adds the class to the fetch (with the marker bumped to `pt-sw-sk-oikm` so the done-state encodes the class set), stages it (`pl_oikm`, all 380 counties), and gives the `stations` layer two new branches: - **Metro**: entrances → one point per station. Entrances of one station share its name, so the name-grouped centroid is the station point (no DBSCAN — the Świętokrzyska ring spans 700+ m); entrance groups within 250 m of each other are one station under the modal name (Wileński's 12 entrances absorb the 13th, "Dworzec Wileński", instead of emitting two points 146 m apart). 38 named stations, the full M1+M2 network. `kategoriaistnienia` (BDOT10k's existence flag) excludes the under-construction M2 western-extension entrances — the unopened Lazurowa station draws no badge (6 unnamed + 4 named Lazurowa w budowie entrances; the flag is empty on some rows, so the predicate is IS DISTINCT FROM 'nieczynny'/'w budowie'). `importance` 2 (the ordinary-station rung, same as Stockholm's metro) → z11. - **Heavy rail**: the same class's `'stacja lub przystanek kolejowy'` kind, one point per named station nationally. Same-named stations in different places stay apart via `ST_ClusterDBSCAN` at 1 000 m `PARTITION BY nazwa` (the 150 m tram value would split a single big station — Warszawa Wschodnia's platform points span 319 m; measured same-name pairs sit <500 m within one station and >1 km between different ones, so 1 000 m is the natural break). `kategoriaistnienia` excludes closed/unbuilt points (99 all-closed stations in the old output). **3 187 named stations nationally** (mode NULL). `importance` 2, with the source's own halt/station signals (`skrotkartograficzny` 'st.'/'p. kol.', `informacjadodatkowa` PKP PLK note) examined and rejected — see docs/country-poland.md: they mis-grade the country's biggest stations (Białystok, Katowice, Poznań Główny and Gdynia Główna all carry the 'p. kol.' halt mark). The `warszawa-metro` badge (issue #64) ships in this PR: the red M on a yellow disc (public domain from Wikimedia Commons — PD-textlogo, the same tag as the Stockholm symbols), sprite-registered under its network name, drawn by the style's station_icons layer from z11. The SVG is normalized to the same disc size as the Stockholm T and carries a proper viewBox. ## The rest of the stop data - **Tram stays on the three city GTFS feeds** (Warszawa ZTM / Kraków ZTP / Łódź ZDiT — the `?download=1` query trick and the shared 150 m DBSCAN collapse as before). OIKM_P cannot replace them: its stop type is one value ('przystanek autobusowy lub tramwajowy') and track proximity cannot separate the two — validated: 91% of ALL Warsaw stops sit within 75 m of a tram line. GTFS route_type is the exact discriminator. The ~184k national bus/tram points OIKM_P also carries are documented as the source of a future national stop layer (the same idea as Finland's DR_PYSAKKI bus stops). - **FI `stations` — the country's tram stops from Digiroad's DR_PYSAKKI** (unchanged from the previous revision of this PR): the `pysakit` product, `PYS_TYYPPI` `[1]` = tram/light rail — 469 poles in Helsinki/Tampere/Raide-Jokeri → 288 stop points. The shapefile reader gained point support and fetch.go fetches shapefile siblings. ## Verification (live DB, after the review round) - `make build`; `go test ./...` in importer/ and mapsrv/ — pass; configs parse through the real loader; `git diff --check` clean. - PL reimport: **4 052 rows in `map_stations_14_pl` = 3 187 rail / 827 tram / 38 metro**; all 38 metro rows carry `unique_icon = 'warszawa-metro'`. Zoom filters per rung (tram z12, metro/rail z11). - Rail phantoms gone: Żabno, Zwierzyniec, Baranowo, Wierzchosławice (the review's spread >1 km groups) no longer collapse into a single midway point; the largest single-station spread (Narzym, 667 m) stays one station. - Closed/unbuilt stations gone: no output rail station consists entirely of nieczynny/w budowie points; the unopened Lazurowa M2 station is absent from the metro set. - Metro dedupe: Wileński + Dworzec Wileński → one Wileński point (verified 146 m apart before). - Decoded z13/z11 tiles over Warsaw: the stations layer carries `name`/`mode`/`importance`/`unique_icon` on every feature; metro features carry the `warszawa-metro` icon name. - Badge pixel-verified through the real pipeline: warszawa-metro renders its red M on the yellow disc at the same disc size as the Stockholm T (50 px vs 48 px at a 60 px render, vs the previous ~59 px full-grid fill). ## Docs - `docs/country-poland.md` — stations section rewritten: the three-rung table (metro + rail from OIKM_P, tram from GTFS), the corrected "no stop class" claim, the metro-entrance→station derivation (Lazurowa exclusion, Wileński merge), the rail DBSCAN eps and kategoriaistnienia reasoning, the halt/station importance rejection, and the national totals (3 187 rail / 38 metro, not "89 in the Warsaw county"). - `docs/country-finland.md` — DR_PYSAKKI row + stations section (unchanged from the previous revision). - `docs/workstream-a.md` — the OIKM_P catalogue row (17 classes now), the corrected class count. - `Makefile` — `OIKM_P` added to `BDOT10K_CLASSES`; `BDOT10K_MARKER` bumped to `pt-sw-sk-oikm`. - `mapsrv/icons/README.md` — three badges, Warsaw colours, no more hypotheticals. This PR does not close #64 — the FI metro stops (HSL GTFS) and the commuter reach question (#63) remain.
The transit-design PR (#65) left the per-country stop work for the delegation. This
lands the first tranche of it — Poland's Kraków and Łódź tram feeds, Finland's
DR_PYSAKKI tram stops, and the Warsaw-metro source finding the docs asked for.

- PL `stations` now covers the capital + two biggest cities: Warszawa (ZTM, unchanged),
  Kraków (ZTP GTFS, 331 poles -> 185 stop points) and Łódź (ZDiT GTFS, 492 poles -> 318).
  All three feeds' poles are unioned into one 150 m DBSCAN-by-name collapse; the two
  new feeds' URLs carry `?download=1` so fetch.go saves the archives whole instead of
  extracting them.
- FI `stations` gains the country's tram stops from Digiroad's DR_PYSAKKI (the
  `pysakit` product): 469 poles in Helsinki/Tampere/Espoo -> 288 stop points
  (mode tram, importance 1, names from NIMI_SU). This needed point support in the
  shapefile reader, which read polygons only.
- importer/fetch.go: a scoped run now fetches a needed shapefile's siblings
  (.shx/.dbf/.prj/.cpg) — before, only the .shp landed and the load produced a
  geometry-only table (no attribute columns).
- Warsaw metro: the finding after a fresh sweep — no official public machine-readable
  source exists. ZTM's public exports (HTTP + FTP archive) carry no metro routes; the
  metro schedules live on a credentials-restricted endpoint; the City of Warsaw API
  has an entrances-only layer; Metro Warszawskie publishes PDFs; BDOT10k has no stop
  class; dane.gov.pl/KPD catalogue nothing. The only complete station source is the
  community mkuran feed (hand-curated coords, frequency-based schedules) — not
  imported without the maintainer's sign-off. Documented in conf/plmap.yaml and
  docs/country-poland.md; the `warszawa-metro` badge waits with it.
- docs: country-poland.md stations section rewritten (three-city feed table + the
  metro finding), country-finland.md (DR_PYSAKKI catalogue row + stations section),
  workstream-a.md (PL feed rows, FI DR_PYSAKKI done).

Verified: make build, go test ./... in importer/ and mapsrv/; live reimports — PL
324 -> 827 (Warszawa 324, Kraków 185, Łódź 318; all named, unique_icon NULL, z12+),
FI 559 -> 847 (559 rail + 288 tram; named rail sites importance 2, tram 1). Decoded
z13 tiles over Łódź, Kraków and Helsinki carry name/mode/importance/country on the
stations layer.

Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
art changed title from #64 per-country transit stops: Kraków/Łódź tram feeds, Digiroad tram stops, Warsaw metro finding to #64 per-country transit stops: Warsaw metro from BDOT10k OIKM_P (official, with badge), Kraków/Łódź tram, FI Digiroad tram 2026-08-05 22:49:06 +00:00
The "no official source for Warsaw's metro stations" finding was wrong, and this
commit lands the correction. **BDOT10k's OIKM_P class ("obiekt związany z
komunikacją") carries the metro entrances** — rodzaj 'wejście do stacji metra',
258 of them in the Warsaw county, named after their station. The class was always
part of the national topographic database; the Makefile's BDOT10K_CLASSES list
simply never fetched it, and the old "BDOT10k has no stop point class" claim was
about the 16 fetched classes, not the delivery.

- Makefile: OIKM_P added to BDOT10K_CLASSES, with a per-file skip condition so
  already-done counties re-fetch once (all 380 landed, ~15 GB one-time).
- conf/plmap.yaml: pl_oikm staging (glob over all counties), and the stations
  query gains two branches:
  - metro: entrances collapsed by name to the station point (the general
    entrance-collapse recipe — same-named nearby points to their mean position;
    the name-grouped centroid of a point collection IS the mean). 40 named
    stations, the full M1+M2 network. importance 2 (same as Stockholm's metro).
  - heavy rail: rodzaj 'stacja lub przystanek kolejowy', one point per named
    station — 89 in the Warsaw county, 3 269 nationally, which finally gives
    Poland the rail rung of the stations contract (mode NULL).
  - tram stays on the three GTFS feeds: OIKM_P's stop type is one value
    ('przystanek autobusowy lub tramwajowy') and track proximity cannot separate
    the modes (91% of ALL Warsaw stops sit within 75 m of a tram line).
- The warszawa-metro badge lands (issue #64): the red M on a yellow disc, public
  domain from Wikimedia Commons (Witold Popiel 1983; SVG by Kubek15), registered
  in sprite.go under its network name and carried by the metro branch's
  unique_icon — the style's station_icons layer draws it from z11, the slot the
  old comment said would stay empty. Probe-verified (red + yellow both rasterize;
  probe deleted).
- docs: country-poland.md stations section rewritten (three-rung table, the
  corrected claim, the entrance-collapse recipe); workstream-a.md gains the
  OIKM_P row (17 classes).

Verified: make build, go test ./... (importer, mapsrv), full reimport —
map_stations_14_pl 827 → 4 136: tram 827 (unchanged), metro 40 (all named,
unique_icon warszawa-metro), rail 3 269 (named, mode NULL). Zoom filters: metro +
rail at z11/z10, +tram at z12, z9 empty. Decoded z13 tiles: the Bemowo tile
carries Bemowo + Lazurowa with mode=metro + unique_icon='warszawa-metro'; a Łódź
tile carries the tram stops + rail stations (Łódź Dąbrowa/Zarzew).

Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
Collaborator

Review

The OIKM_P finding is real and well argued, the tram-vs-bus validation is the right call, and the FI half is clean. The Poland rail branch is where I'd push back: it is the only branch that runs nationally, and it drops the two safeguards the other branches have. Everything below is verified against the live maps DB (the branch's own staging tables are still loaded).

Blocking

1. The rail branch's GROUP BY nazwa is national — same-named stations across Poland collapse into one phantom point. The metro/rail branches in conf/plmap.yaml group by name alone, with no DBSCAN. For metro that's fine (one city). For rail it isn't:

nazwa            pts   spread (3857 m)
Żabno              2         762 240
Zwierzyniec        2         739 884
Baranowo           2         473 147
Wierzchosławice    2         439 144

20 name groups spread >1 km, 9 over 10 km. Żabno's two stations sit ~470 real km apart and render as a single station halfway between them. The tram branch's own comment states the reason the eps exists — "the eps is what keeps two same-named groups in different places apart" — and the rail branch is exactly the case it describes. Fix is the pattern already in the file: ST_ClusterDBSCAN(geom, eps, 1) OVER (PARTITION BY nazwa), then GROUP BY nazwa, cl.

2. kategoriaistnienia is never filtered, so closed and unbuilt stations render as live ones. The column is BDOT10k's existence flag and it is populated:

rodzaj eksploatowany (empty) nieczynny w budowie
stacja lub przystanek kolejowy 2 658 773 91 13
wejście do stacji metra 248 10

99 output rail stations consist entirely of nieczynny/w budowie points. And the metro claim in the config comment — "Five unnamed entrances (two clusters — under-construction stations) are excluded by the nazwa filter" — doesn't hold: of the 10 w budowie entrances, 6 are unnamed (excluded) but 4 are named Lazurowa, so the unopened M2 western-extension station is in the 40 and draws an M badge. The nazwa IS NOT NULL filter is a proxy for a flag the source actually carries. Note 773 rail rows have the column empty, so the predicate wants to be kategoriaistnienia IS DISTINCT FROM 'nieczynny' AND IS DISTINCT FROM 'w budowie', not = 'eksploatowany'.

Worth fixing

3. Duplicate metro station point. BDOT10k names 12 entrances Wileński and one Dworzec Wileński — the same M2 station. Name-only grouping emits two stations 146 m apart, both badged, from z11. The argument against DBSCAN here (Świętokrzyska's ring spans 700+ m) is sound, so the fix isn't DBSCAN — either normalise the name, or, since 40 stations is a hand-checkable set, collapse metro entrances spatially at ~250 m and take the modal name.

4. importance 2 for every rail point contradicts the shared ladder. common.yaml defines rung 1 as "halt, minor stop, non-passenger operating point", and the class is literally stacja lub przystanek. The source does carry a discriminator — skrotkartograficzny is 'st.' (68) vs 'p. kol.' (2 327), and informacjadodatkowa says "stacja kolejowa - wg danych PKP PLK" on 857 rows. As it stands Poland puts 3 269 points on the z11 rung where Finland grades named-vs-unnamed and Sweden grades on ResUtbyte/PlTyp. Either use the signal or record in the docs that it was seen and why it was rejected — the docs currently mention neither the halt/station split nor the national total (they stop at "89 in the Warsaw county").

Stale text

5. The PR body describes the previous revision: it says the badge is a sprite decision that hasn't landed and "the metro renders as the style's blue-ringed mode=metro dot", and reports unique_icon NULL on every row and ~1 900 rows. The branch ships warszawa-metro.svg, and the live table is 4 136 rows (3 269 rail / 827 tram / 40 metro, all 40 with unique_icon).

6. docs/country-poland.md contradicts itself — line ~242 announces the Warsaw badge, line ~297 still says "the metro T and the commuter J are the only station badges, and both are Stockholm's". The adjacent line was edited in this PR, so it was in view.

7. mapsrv/icons/README.md: "Both are scaled from their original artwork…" immediately after listing three; the colour list (#000080, #aeacad, #231f20) doesn't include the Warsaw red/yellow; and "A new network's badge (say, a Warsaw metro M)" is no longer hypothetical.

Minor

8. The badge rasterizes correctly (rendered at 60 px — the M reads clean), but it fills the grid: r=44.5 of a 91-unit box vs Stockholm's 6.35 of 15, so the M draws ~13% larger than the T at the same icon-size. It also has no viewBox, relying on oksvg's width/height fallback, unlike the other two — which is what the README's "scaled by the sprite pipeline" sentence describes but isn't quite what happens. Also worth a second look at the PD claim: Wikimedia's tag rests on Polish law's official-symbols exemption, which is thinner ground than the Swedish two.

9. The Makefile skip condition [ -f "$marker" ] && [ -f "…OT_OIKM_P.gpkg" ] re-downloads a county's whole zip on every run forever if that county's delivery ever lacks the class. All 380 carry it today (count(distinct teryt) = 380 in pl_oikm, vs 372 in pl_sktr), so it's cosmetic — but bumping BDOT10K_MARKER to pt-sw-sk-oikm is what that variable is for and stays idempotent.

Checks out

fetch.go's sibling marking is safe — needed only gates declared downloads: entries, so marking .prj/.cpg can't invent a 404. The shapefile point support is a tidy split (esriShapeToEWKT). FI is clean: 288 tram / 383 named rail / 176 unnamed, zero unnamed tram stops, so the NULLIF(BTRIM(nimi_su),'') NULL path never fires. zoom_filters match SE and FI (11/9). style.json needs no change — it selects on unique_icon generically. importer builds and tests pass; mapsrv's TestDumpGlyphPNG fails identically on main (it writes /tmp/glyph_g.png, sandbox permission), so it is not this PR.

## Review The OIKM_P finding is real and well argued, the tram-vs-bus validation is the right call, and the FI half is clean. The Poland rail branch is where I'd push back: it is the only branch that runs nationally, and it drops the two safeguards the other branches have. Everything below is verified against the live `maps` DB (the branch's own staging tables are still loaded). ### Blocking **1. The rail branch's `GROUP BY nazwa` is national — same-named stations across Poland collapse into one phantom point.** The metro/rail branches in `conf/plmap.yaml` group by name alone, with no DBSCAN. For metro that's fine (one city). For rail it isn't: ``` nazwa pts spread (3857 m) Żabno 2 762 240 Zwierzyniec 2 739 884 Baranowo 2 473 147 Wierzchosławice 2 439 144 ``` 20 name groups spread >1 km, 9 over 10 km. `Żabno`'s two stations sit ~470 real km apart and render as a single station halfway between them. The tram branch's own comment states the reason the eps exists — "the eps is what keeps two same-named groups in different places apart" — and the rail branch is exactly the case it describes. Fix is the pattern already in the file: `ST_ClusterDBSCAN(geom, eps, 1) OVER (PARTITION BY nazwa)`, then `GROUP BY nazwa, cl`. **2. `kategoriaistnienia` is never filtered, so closed and unbuilt stations render as live ones.** The column is BDOT10k's existence flag and it is populated: | rodzaj | eksploatowany | (empty) | nieczynny | w budowie | |---|---|---|---|---| | stacja lub przystanek kolejowy | 2 658 | 773 | 91 | 13 | | wejście do stacji metra | 248 | — | — | 10 | 99 output rail stations consist *entirely* of `nieczynny`/`w budowie` points. And the metro claim in the config comment — "Five unnamed entrances (two clusters — under-construction stations) are excluded by the nazwa filter" — doesn't hold: of the 10 `w budowie` entrances, 6 are unnamed (excluded) but **4 are named `Lazurowa`**, so the unopened M2 western-extension station is in the 40 and draws an M badge. The `nazwa IS NOT NULL` filter is a proxy for a flag the source actually carries. Note 773 rail rows have the column empty, so the predicate wants to be `kategoriaistnienia IS DISTINCT FROM 'nieczynny' AND IS DISTINCT FROM 'w budowie'`, not `= 'eksploatowany'`. ### Worth fixing **3. Duplicate metro station point.** BDOT10k names 12 entrances `Wileński` and one `Dworzec Wileński` — the same M2 station. Name-only grouping emits two stations 146 m apart, both badged, from z11. The argument against DBSCAN here (Świętokrzyska's ring spans 700+ m) is sound, so the fix isn't DBSCAN — either normalise the name, or, since 40 stations is a hand-checkable set, collapse metro entrances spatially at ~250 m and take the modal name. **4. `importance` 2 for every rail point contradicts the shared ladder.** `common.yaml` defines rung 1 as "halt, minor stop, non-passenger operating point", and the class is literally *stacja **lub przystanek***. The source does carry a discriminator — `skrotkartograficzny` is `'st.'` (68) vs `'p. kol.'` (2 327), and `informacjadodatkowa` says `"stacja kolejowa - wg danych PKP PLK"` on 857 rows. As it stands Poland puts 3 269 points on the z11 rung where Finland grades named-vs-unnamed and Sweden grades on ResUtbyte/PlTyp. Either use the signal or record in the docs that it was seen and why it was rejected — the docs currently mention neither the halt/station split nor the national total (they stop at "89 in the Warsaw county"). ### Stale text **5.** The PR body describes the *previous* revision: it says the badge is a sprite decision that hasn't landed and "the metro renders as the style's blue-ringed mode=metro dot", and reports `unique_icon` NULL on every row and ~1 900 rows. The branch ships `warszawa-metro.svg`, and the live table is 4 136 rows (3 269 rail / 827 tram / 40 metro, all 40 with `unique_icon`). **6.** `docs/country-poland.md` contradicts itself — line ~242 announces the Warsaw badge, line ~297 still says "the metro T and the commuter J are the only station badges, and both are Stockholm's". The adjacent line was edited in this PR, so it was in view. **7.** `mapsrv/icons/README.md`: "**Both** are scaled from their original artwork…" immediately after listing three; the colour list (`#000080`, `#aeacad`, `#231f20`) doesn't include the Warsaw red/yellow; and "A new network's badge (say, a Warsaw metro M)" is no longer hypothetical. ### Minor **8.** The badge rasterizes correctly (rendered at 60 px — the M reads clean), but it fills the grid: `r=44.5` of a 91-unit box vs Stockholm's `6.35` of 15, so the M draws ~13% larger than the T at the same `icon-size`. It also has no `viewBox`, relying on oksvg's width/height fallback, unlike the other two — which is what the README's "scaled by the sprite pipeline" sentence describes but isn't quite what happens. Also worth a second look at the PD claim: Wikimedia's tag rests on Polish law's official-symbols exemption, which is thinner ground than the Swedish two. **9.** The Makefile skip condition `[ -f "$marker" ] && [ -f "…OT_OIKM_P.gpkg" ]` re-downloads a county's whole zip on every run forever if that county's delivery ever lacks the class. All 380 carry it today (`count(distinct teryt)` = 380 in `pl_oikm`, vs 372 in `pl_sktr`), so it's cosmetic — but bumping `BDOT10K_MARKER` to `pt-sw-sk-oikm` is what that variable is for and stays idempotent. ### Checks out `fetch.go`'s sibling marking is safe — `needed` only gates *declared* `downloads:` entries, so marking `.prj`/`.cpg` can't invent a 404. The shapefile point support is a tidy split (`esriShapeToEWKT`). FI is clean: 288 tram / 383 named rail / 176 unnamed, zero unnamed tram stops, so the `NULLIF(BTRIM(nimi_su),'')` NULL path never fires. `zoom_filters` match SE and FI (11/9). `style.json` needs no change — it selects on `unique_icon` generically. `importer` builds and tests pass; `mapsrv`'s `TestDumpGlyphPNG` fails identically on `main` (it writes `/tmp/glyph_g.png`, sandbox permission), so it is not this PR.
Addresses every item of the maintainer's review of PR #66 (posted 2026-08-05),
verified against the live maps DB before committing.

Rail branch (was the only national branch without the two safeguards):
- ST_ClusterDBSCAN(geom, 1000, 1) OVER (PARTITION BY nazwa), GROUP BY nazwa, cl —
  same-named stations in different places stay apart. The 150 m tram value would
  split a single big station (Warszawa Wschodnia's platform points span 319 m with
  a 255 m gap); measured same-name pairs sit <500 m within one station and >1 km
  between different ones, so 1 000 m is the natural break. The review's phantoms
  all split: Żabno, Zwierzyniec, Baranowo (473 km between its two stations),
  Wierzchosławice, Głuchów, Majdan, Chrząstowice, Janówek, Tarnobrzeg → 2 stations
  each; the largest single-station spread (Narzym, 667 m) stays whole.
- kategoriaistnienia IS DISTINCT FROM 'nieczynny' AND IS DISTINCT FROM 'w budowie'
  in both the rail and the metro branches — BDOT10k's own existence flag instead of
  the name proxy. 91 + 13 of 3 535 rail rows are closed/unbuilt; 99 old-output
  stations consisted entirely of them and are gone. The 773 rows with the flag
  empty survive (IS DISTINCT FROM, not = 'eksploatowany'). The unopened M2 western
  extension (6 unnamed + 4 named Lazurowa w budowie entrances) draws no M badge.
- importance stays 2 for every rail station, with the source's own discriminator
  examined and rejected IN THE DOCS (the review allowed either): skrotkartograficzny
  'st.' vs 'p. kol.' (71 vs 2 329 rows) and informacjadodatkowa "stacja kolejowa -
  wg danych PKP PLK" (830 rows) both mis-grade Białystok, Katowice, Poznań Główny
  and Gdynia Główna as halts, 1 055 rows have no skrot, and 433 'p. kol.' rows also
  carry the station note — any grading would demote the country's biggest stations.
  Poland grades like Finland's named-vs-unnamed (all named → 2); docs now record
  the halt/station split and the national total (3 187 stations, not "89 in the
  Warsaw county").

Metro branch:
- same-named entrance groups within 250 m are one station under the modal name:
  Wileński (12 entrances) absorbs Dworzec Wileński (1) instead of emitting two
  points 146 m apart. No DBSCAN — the Świętokrzyska ring spans 700+ m.

Badge (item 8):
- warszawa-metro.svg now carries a proper viewBox and the 91-unit artwork sits in a
  105.1-unit box (like the commuter J's own coordinate system), so the disc fills
  the same fraction of the icon grid as the Stockholm T (r 44.5 of 91 → 6.35 of 15;
  pixel-verified through the real pipeline: 48 px disc vs Stockholm's 50 px at a
  60 px render, was ~59 px full-grid). PD claim verified: the Commons tag is
  PD-textlogo (below the threshold of originality), the same tag as the Stockholm
  metro symbol — the SVG and docs say so precisely.
- mapsrv/icons/README.md: "Both" → "All three", Warsaw red/yellow added to the
  colour list, the "say, a Warsaw metro M" hypothetical dropped.

Stale text (items 5-7):
- docs/country-poland.md: metro 40 → 38 stations, Lazurowa exclusion via the
  existence flag (not the name proxy), Wileński merge, rail national total 3 187,
  DBSCAN eps + kategoriaistnienia reasoning, the importance rejection, and the
  self-contradiction fixed (line ~242 announced the Warsaw badge while line ~297
  still said T and J were the only badges — both Stockholm's).
- docs/workstream-a.md: marker list gains .pt-sw-sk-oikm.done; the "a metro source
  would light up a badge for Warsaw" future-work item now records the badge landed.
- Makefile: BDOT10K_MARKER bumped pt-sw-sk → pt-sw-sk-oikm so the OIKM_P fetch
  stays idempotent (item 9).

Verification (live DB, after reimport):
- make build; go test ./... in importer/ and mapsrv/ — pass; conf parses through
  the real loader; git diff --check clean.
- map_stations_14_pl = 4 052 rows: 3 187 rail / 827 tram / 38 metro, all 38 metro
  with unique_icon 'warszawa-metro'. Lazurowa absent; Dworzec Wileński absent;
  every output rail station has ≥1 live source point; per-zoom partitions correct
  (z11 = 3 225 = 38 + 3 187, z9 empty).
- Decoded z11 tile over Warsaw: stations layer carries name/mode/importance/
  unique_icon/country; metro features carry the badge name. Real-browser CDP check
  at z14 over Wileński: station_icons renders 3 metro badges (Szwedzka, Stadion
  Narodowy, Wileński) with unique_icon warszawa-metro; the yellow-disc red-M badge
  pixel-verified in the sprite sheet.

Co-Authored-By: Hermes Agent <noreply@nousresearch.com>
Author
Owner

Review round answered — every item fixed and verified against the live DB

All changes are on night/issue-64-per-country-stops (commit 5a1ea58, pushed), and
the PR body now describes the current revision. Verification was done against the
live maps DB after a full -layer stations reimport.

Blocking 1 — rail DBSCAN (fixed)

The rail branch now clusters like the tram branch: ST_ClusterDBSCAN(geom, 1000, 1) OVER (PARTITION BY nazwa), GROUP BY nazwa, cl. The eps is 1 000 m, justified from
the data: 150 m (the tram value) would split a single big station — Warszawa
Wschodnia's platform points span 319 m with a 255 m gap between groups — while
measured same-name pairs sit <500 m within one station and >1 km between different
ones, so 1 000 m is the natural break between the two populations. Verified: the
review's phantoms all split into 2 stations (Baranowo's two are 473 147 m apart —
the exact spread the review measured), as do Głuchów, Majdan, Chrząstowice, Janówek,
Tarnobrzeg; the largest single-station spread (Narzym, 667 m) stays whole, and
Warszawa Wschodnia / Zachodnia remain one station each. (Żabno and Wierzchosławice
now emit one station, not two — see blocking 2: their second point is nieczynny
and is now filtered out.)

Blocking 2 — kategoriaistnienia filter (fixed)

kategoriaistnienia IS DISTINCT FROM 'nieczynny' AND IS DISTINCT FROM 'w budowie'
is applied in both the rail and the metro branches (in the source query, not the
outer select), keeping the 773 rows where the flag is empty — so it is the
IS DISTINCT FROM form the review specified, not = 'eksploatowany'. Verified:
every one of the 3 187 output rail stations has ≥1 source point that is
eksploatowany or flag-empty (0 all-closed stations remain; the old output had 99).
The metro claim is corrected too: the 4 named w budowie entrances are Lazurowa,
and Lazurowa is absent from the output — the unopened M2 station draws no M badge.
(The config comment no longer claims the nazwa filter excludes the under-
construction stations.)

Worth fixing 3 — metro dedupe (fixed)

Entrance groups within 250 m of each other are now one station under the modal
name (no DBSCAN — the Świętokrzyska ring spans 700+ m, untouched): Wileński (12
entrances) absorbs Dworzec Wileński (1), so the output has one Wileński point
instead of two 146 m apart. Verified: Dworzec Wileński is absent from
map_stations_14_pl, Wileński present once. The metro count is 38, not 36:
40 minus Lazurowa (one station name with 4 entrances) minus the Wileński merge.
Full hand-checkable list, all with unique_icon = warszawa-metro: Bemowo, Bródno,
Centrum, Centrum Nauki Kopernik, Dworzec Gdański, Imielin, Kabaty, Kondratowicza,
Księcia Janusza, Marymont, Młociny, Młynów, Natolin, Nowy Świat Uniwersytet, Plac
Wilsona, Płocka, Pole Mokotowskie, Politechnika, Racławicka, Ratusz Arsenał, Rondo
Daszyńskiego, Rondo ONZ, Słodowiec, Służew, Stadion Narodowy, Stare Bielany,
Stokłosy, Świętokrzyska, Szwedzka, Targówek Mieszkaniowy, Trocka, Ulrychów,
Ursynów, Wawrzyszew, Wierzbno, Wilanowska, Wileński, Zacisze.

Worth fixing 4 — importance, with the rejection documented (fixed)

The signals were examined and rejected, with the reasoning recorded in
docs/country-poland.md
(the option the review offered). skrotkartograficzny
'st.' vs 'p. kol.' is 71 vs 2 329 rows and informacjadodatkowa "stacja kolejowa -
wg danych PKP PLK" covers 830 rows — but Białystok, Katowice, Poznań Główny and
Gdynia Główna all carry the 'p. kol.' halt mark, 1 055 rows have no skrot at all,
and 433 'p. kol.' rows also carry the "stacja kolejowa" note. Any grading built on
them would demote the country's biggest stations to the halt rung, so Poland grades
the way Finland's rail does (named-vs-unnamed: all named → 2). The docs now mention
both the halt/station split and the national total: 3 187 rail stations (the old
text stopped at "89 in the Warsaw county").

Stale text 5–7 and minor 8–9 (fixed)

  1. PR body rewritten for the current revision: warszawa-metro.svg ships, live
    table is 4 052 rows = 3 187 rail / 827 tram / 38 metro, all 38 metro with
    unique_icon.
  2. docs/country-poland.md self-contradiction fixed — the badge paragraph and the
    "T and J are the only badges" line now agree (three network badges: the Warsaw M
    in this PR, Stockholm's T and J).
  3. mapsrv/icons/README.md: "Both" → "All three", Warsaw red/yellow (#cb1517 /
    #f8d958) added to the colour list, the "say, a Warsaw metro M" hypothetical
    dropped.
  4. warszawa-metro.svg gained a proper viewBox (the 91-unit artwork sits in a
    105.1-unit box, like the commuter J's own coordinate system) and its disc now
    fills the same fraction of the icon grid as the Stockholm T. Pixel-verified
    through the real pipeline at 60 px: Warsaw disc 48 px vs Stockholm 50 px (was
    ~59 px full-grid before). The PD claim was re-checked against the Commons file:
    the tag is PD-textlogo (below the threshold of originality) — the same tag
    as the Stockholm metro symbol, not the Polish official-symbols exemption — and
    the SVG/README state that precisely.
  5. BDOT10K_MARKER bumped to pt-sw-sk-oikm; docs/workstream-a.md marker list
    updated to match.

Verification chain (repo convention)

make build and go test ./... pass in importer/ and mapsrv/ (the known
TestDumpGlyphPNG failure on main is unchanged); the conf loads through the real
loader; git diff --check clean. After the reimport: map_stations_14_pl = 4 052
rows (3 187 / 827 / 38), all 38 metro with unique_icon; per-zoom partitions
correct (z11 = 3 225 = 38 + 3 187, z9 empty); decoded z11 tile over Warsaw carries
name/mode/importance/unique_icon/country on stations with the badge name on the
metro features; real-browser CDP check at z14 over Wileński renders the three metro
badges (Szwedzka, Stadion Narodowy, Wileński) with unique_icon: warszawa-metro,
and the sprite sheet pixel-check shows the red M on the yellow disc at the right
size. FI is untouched, per the review.

## Review round answered — every item fixed and verified against the live DB All changes are on `night/issue-64-per-country-stops` (commit `5a1ea58`, pushed), and the PR body now describes the current revision. Verification was done against the live `maps` DB after a full `-layer stations` reimport. ### Blocking 1 — rail DBSCAN (fixed) The rail branch now clusters like the tram branch: `ST_ClusterDBSCAN(geom, 1000, 1) OVER (PARTITION BY nazwa)`, `GROUP BY nazwa, cl`. The eps is 1 000 m, justified from the data: 150 m (the tram value) would split a single big station — Warszawa Wschodnia's platform points span 319 m with a 255 m gap between groups — while measured same-name pairs sit <500 m within one station and >1 km between different ones, so 1 000 m is the natural break between the two populations. Verified: the review's phantoms all split into 2 stations (Baranowo's two are 473 147 m apart — the exact spread the review measured), as do Głuchów, Majdan, Chrząstowice, Janówek, Tarnobrzeg; the largest single-station spread (Narzym, 667 m) stays whole, and Warszawa Wschodnia / Zachodnia remain one station each. (Żabno and Wierzchosławice now emit one station, not two — see blocking 2: their second point is `nieczynny` and is now filtered out.) ### Blocking 2 — kategoriaistnienia filter (fixed) `kategoriaistnienia IS DISTINCT FROM 'nieczynny' AND IS DISTINCT FROM 'w budowie'` is applied in both the rail and the metro branches (in the source query, not the outer select), keeping the 773 rows where the flag is empty — so it is the `IS DISTINCT FROM` form the review specified, not `= 'eksploatowany'`. Verified: every one of the 3 187 output rail stations has ≥1 source point that is `eksploatowany` or flag-empty (0 all-closed stations remain; the old output had 99). The metro claim is corrected too: the 4 named `w budowie` entrances are Lazurowa, and Lazurowa is absent from the output — the unopened M2 station draws no M badge. (The config comment no longer claims the nazwa filter excludes the under- construction stations.) ### Worth fixing 3 — metro dedupe (fixed) Entrance groups within 250 m of each other are now one station under the modal name (no DBSCAN — the Świętokrzyska ring spans 700+ m, untouched): Wileński (12 entrances) absorbs Dworzec Wileński (1), so the output has one Wileński point instead of two 146 m apart. Verified: `Dworzec Wileński` is absent from `map_stations_14_pl`, Wileński present once. The metro count is **38**, not 36: 40 minus Lazurowa (one station name with 4 entrances) minus the Wileński merge. Full hand-checkable list, all with `unique_icon = warszawa-metro`: Bemowo, Bródno, Centrum, Centrum Nauki Kopernik, Dworzec Gdański, Imielin, Kabaty, Kondratowicza, Księcia Janusza, Marymont, Młociny, Młynów, Natolin, Nowy Świat Uniwersytet, Plac Wilsona, Płocka, Pole Mokotowskie, Politechnika, Racławicka, Ratusz Arsenał, Rondo Daszyńskiego, Rondo ONZ, Słodowiec, Służew, Stadion Narodowy, Stare Bielany, Stokłosy, Świętokrzyska, Szwedzka, Targówek Mieszkaniowy, Trocka, Ulrychów, Ursynów, Wawrzyszew, Wierzbno, Wilanowska, Wileński, Zacisze. ### Worth fixing 4 — importance, with the rejection documented (fixed) The signals were examined and **rejected, with the reasoning recorded in docs/country-poland.md** (the option the review offered). `skrotkartograficzny` 'st.' vs 'p. kol.' is 71 vs 2 329 rows and `informacjadodatkowa` "stacja kolejowa - wg danych PKP PLK" covers 830 rows — but Białystok, Katowice, Poznań Główny and Gdynia Główna all carry the 'p. kol.' halt mark, 1 055 rows have no skrot at all, and 433 'p. kol.' rows also carry the "stacja kolejowa" note. Any grading built on them would demote the country's biggest stations to the halt rung, so Poland grades the way Finland's rail does (named-vs-unnamed: all named → 2). The docs now mention both the halt/station split and the **national total: 3 187 rail stations** (the old text stopped at "89 in the Warsaw county"). ### Stale text 5–7 and minor 8–9 (fixed) 5. PR body rewritten for the current revision: `warszawa-metro.svg` ships, live table is 4 052 rows = 3 187 rail / 827 tram / 38 metro, all 38 metro with `unique_icon`. 6. docs/country-poland.md self-contradiction fixed — the badge paragraph and the "T and J are the only badges" line now agree (three network badges: the Warsaw M in this PR, Stockholm's T and J). 7. mapsrv/icons/README.md: "Both" → "All three", Warsaw red/yellow (#cb1517 / #f8d958) added to the colour list, the "say, a Warsaw metro M" hypothetical dropped. 8. warszawa-metro.svg gained a proper viewBox (the 91-unit artwork sits in a 105.1-unit box, like the commuter J's own coordinate system) and its disc now fills the same fraction of the icon grid as the Stockholm T. Pixel-verified through the real pipeline at 60 px: Warsaw disc 48 px vs Stockholm 50 px (was ~59 px full-grid before). The PD claim was re-checked against the Commons file: the tag is **PD-textlogo** (below the threshold of originality) — the same tag as the Stockholm metro symbol, not the Polish official-symbols exemption — and the SVG/README state that precisely. 9. `BDOT10K_MARKER` bumped to `pt-sw-sk-oikm`; docs/workstream-a.md marker list updated to match. ### Verification chain (repo convention) `make build` and `go test ./...` pass in importer/ and mapsrv/ (the known TestDumpGlyphPNG failure on main is unchanged); the conf loads through the real loader; `git diff --check` clean. After the reimport: `map_stations_14_pl` = 4 052 rows (3 187 / 827 / 38), all 38 metro with `unique_icon`; per-zoom partitions correct (z11 = 3 225 = 38 + 3 187, z9 empty); decoded z11 tile over Warsaw carries `name/mode/importance/unique_icon/country` on stations with the badge name on the metro features; real-browser CDP check at z14 over Wileński renders the three metro badges (Szwedzka, Stadion Narodowy, Wileński) with `unique_icon: warszawa-metro`, and the sprite sheet pixel-check shows the red M on the yellow disc at the right size. FI is untouched, per the review.
Collaborator

Review

The BDOT10k OIKM_P finding is genuinely good work, and the honesty about why the old "no official source" conclusion was wrong (16 fetched classes ≠ the delivery) is the right way to record it.

Everything I could check against the live DB holds up: pl_oikm loaded, all 258 metro entrances in teryt 1465 (Warszawa), 39 metro names → 38 stations with Dworzec Wileński → Wileński as the only merge, 3,187 rail stations, FI's pys_tyyppi exactly [1]/[2]/[5]/[6] with 469 tram poles and zero unnamed, all 94,869 Digiroad rows loaded. Builds and vet pass. The fetch.go sibling marking is safe — ensureDownloads filters the downloads list, so an unlisted .cpg is a no-op.

1. Poland's z9 rung is empty, and z10 is crowded

zoom pl se fi
z9 0 485 0
z10 3,225 964 383
z11 3,225 964 383

Poland shows every rail halt in the country (3.3× Sweden) at a whole-country zoom, then nothing at z9 while Sweden shows its 485 major stations.

I agree with rejecting BDOT10k's own discriminator — Poznań Główny and Katowice carrying the p. kol. halt mark is disqualifying, and the PR documents that well. But it leaves rung 3 unfilled. A name/administrative proxy (Główny/Centralna, voivodeship capitals) would fill it. Worth an issue rather than a blocker, since Finland has the same documented gap.

2. metro_merged is non-transitive — latent misplacement

conf/plmap.yaml, the metro_merged CTE. Each name maps to the largest group within 250 m, independently. In a chain A(5) — B(10) — C(12) where A–C > 250 m, A→win=B and B→win=C, so the query emits a station named B positioned at A's entrances, plus one named C holding B's and C's.

I checked: zero chain-broken cases in today's 39 names, so it doesn't fire. But the comment presents this as a general recipe ("Same recipe would apply to any future named-entrance source"). ST_ClusterDBSCAN(250) over the group centroids with a modal name per cluster would be the robust form.

3. unique_icon is hardcoded 'warszawa-metro' for every metro row nationally

True today — verified all 258 entrances are in one teryt — but the value is a network name on a branch with no network predicate. Worth a note that this holds only while Poland has exactly one metro.

Minor

  • The marker bump re-downloads all 380 full county GPKG zips to extract one class. Correct and idempotent — dropping the broken per-file guard in 382cce0 was right — but the old .pt-sw-sk.done markers are never cleaned up.
  • pys_tyyppi LIKE '%[1]%' works (values are exactly [1]/[2]/[5]/[6], verified) but leans on brackets being literal in Postgres LIKE and on codes never reaching two digits. = '[1]' is exact and clearer.
  • esriShapeToEWKT handles *shp.Point and *shp.Polygon only; PointZ/PointM/PolygonZ silently return "" and the row is skipped with no diagnostic. Fine here (all 94,869 rows loaded), but a silent skip is a bad failure mode for the next shapefile — a count of skipped shapes in the log would help.

Disposition: mergeable as-is, with the z9 rung and the metro-merge transitivity filed as issues.

The one mapsrv test failure (glyph_dump_test.go:40: open /tmp/glyph_g.png: permission denied) is environmental and reproduces on main — not this PR.

## Review The BDOT10k OIKM_P finding is genuinely good work, and the honesty about *why* the old "no official source" conclusion was wrong (16 fetched classes ≠ the delivery) is the right way to record it. Everything I could check against the live DB holds up: `pl_oikm` loaded, all 258 metro entrances in teryt 1465 (Warszawa), 39 metro names → 38 stations with `Dworzec Wileński → Wileński` as the only merge, 3,187 rail stations, FI's `pys_tyyppi` exactly `[1]/[2]/[5]/[6]` with 469 tram poles and zero unnamed, all 94,869 Digiroad rows loaded. Builds and vet pass. The `fetch.go` sibling marking is safe — `ensureDownloads` filters the downloads list, so an unlisted `.cpg` is a no-op. ### 1. Poland's z9 rung is empty, and z10 is crowded | zoom | pl | se | fi | |---|---|---|---| | z9 | 0 | 485 | 0 | | z10 | 3,225 | 964 | 383 | | z11 | 3,225 | 964 | 383 | Poland shows every rail halt in the country (3.3× Sweden) at a whole-country zoom, then nothing at z9 while Sweden shows its 485 major stations. I agree with rejecting BDOT10k's own discriminator — Poznań Główny and Katowice carrying the `p. kol.` halt mark is disqualifying, and the PR documents that well. But it leaves rung 3 unfilled. A name/administrative proxy (`Główny`/`Centralna`, voivodeship capitals) would fill it. Worth an issue rather than a blocker, since Finland has the same documented gap. ### 2. `metro_merged` is non-transitive — latent misplacement `conf/plmap.yaml`, the `metro_merged` CTE. Each name maps to the largest group within 250 m, independently. In a chain A(5) — B(10) — C(12) where A–C > 250 m, A→`win`=B and B→`win`=C, so the query emits a station **named B positioned at A's entrances**, plus one named C holding B's and C's. I checked: zero chain-broken cases in today's 39 names, so it doesn't fire. But the comment presents this as a general recipe ("Same recipe would apply to any future named-entrance source"). `ST_ClusterDBSCAN(250)` over the group centroids with a modal name per cluster would be the robust form. ### 3. `unique_icon` is hardcoded `'warszawa-metro'` for every metro row nationally True today — verified all 258 entrances are in one teryt — but the value is a *network* name on a branch with no network predicate. Worth a note that this holds only while Poland has exactly one metro. ### Minor - The marker bump re-downloads all 380 full county GPKG zips to extract one class. Correct and idempotent — dropping the broken per-file guard in 382cce0 was right — but the old `.pt-sw-sk.done` markers are never cleaned up. - `pys_tyyppi LIKE '%[1]%'` works (values are exactly `[1]`/`[2]`/`[5]`/`[6]`, verified) but leans on brackets being literal in Postgres LIKE and on codes never reaching two digits. `= '[1]'` is exact and clearer. - `esriShapeToEWKT` handles `*shp.Point` and `*shp.Polygon` only; `PointZ`/`PointM`/`PolygonZ` silently return `""` and the row is skipped with no diagnostic. Fine here (all 94,869 rows loaded), but a silent skip is a bad failure mode for the next shapefile — a count of skipped shapes in the log would help. --- **Disposition:** mergeable as-is, with the z9 rung and the metro-merge transitivity filed as issues. The one mapsrv test failure (`glyph_dump_test.go:40: open /tmp/glyph_g.png: permission denied`) is environmental and reproduces on `main` — not this PR.
art merged commit 22d196a7ab into main 2026-08-06 18:59:17 +00:00
art deleted branch night/issue-64-per-country-stops 2026-08-06 18:59:17 +00:00
Collaborator

Follow-ups filed, both unassigned:

  • #68 — Poland's stations have no importance-3 rung (z9 empty, 3 225 stations at z10)
  • #69metro_merged is non-transitive (latent; 0 chain-broken cases in today's 39 names)

Neither blocks this PR.

Follow-ups filed, both unassigned: - #68 — Poland's stations have no importance-3 rung (z9 empty, 3 225 stations at z10) - #69 — `metro_merged` is non-transitive (latent; 0 chain-broken cases in today's 39 names) Neither blocks this PR.
Sign in to join this conversation.
No reviewers
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!66
No description provided.