garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/notes/nwb-road-network.md

raw


topic: nwb-road-network triggers: [NWB, wegvakken, hectopunten, rel_hoogte, WEGGEG, rijstroken, wvk_id, road_width_m, "measured carriageway", "bridge geometry", PDOK, Rijkswaterstaat, road_texture.rs, paving.rs, road_levels.rs, pipeline/mod.rs] updated: 2026-10-17

NWB: checked against the live service, and not taken

The frontier row promised "measured carriageways, and bridge and tunnel geometry". Both halves are wrong. Checked 2026-08-29 against https://api.pdok.nl/rws/nationaal-wegenbestand-wegen/ogc/v1 (OGC API Features), which has exactly two collections: wegvakken (road sections) and hectopunten (hectometre posts).

The licence is CC0 1.0, read off the landing page's own rel="license" link, not off a wiki — so the licence was never the obstacle. This was rejected on content, not on terms.

What it actually carries

wegvakken geometry is multilinestring — /collections/wegvakken/schema?f=json gives .properties.geometry as {"x-ogc-role": "primary-geometry", "format": "geometry-multilinestring"}. hectopunten is multipoint. There is no polygon anywhere in the service.

The 60-odd properties are administrative: street name, road number, route number, road authority, house-number ranges, municipality, openlr, wvk_id / jte_id_beg / jte_id_end, bst_code, fow, frc, rel_hoogte. So:

The three gaps it might have filled are already closed

rel_hoogte is mostly absent anyway. Measured 2026-08-29, unpaged: 363 of 400 null at Knooppunt Oudenrijn (bbox=5.045,52.060,5.085,52.085), 969 of 1000 null over Groningen centre (bbox=6.555,53.207,6.580,53.222).

What it would cost, and what it would change

Paged on the rel="next" link over bbox=6.555,53.207,6.580,53.222 — ~1.7 × 1.7 km of Groningen centre, comparable to the z14 cell the additive trees bin at (crates/cartopolis/src/systems/map/surveyed.rs:36) — on 2026-08-29: 1,392 features, 2,033,782 bytes (2.03 MB) of raw GeoJSON, in two requests. That is the same order as the heaviest thing the client streams today (paving, 3.8 MB for the densest cell), spent on a second copy of centrelines the MVT already delivers for free.

Two paging traps, both verified. The page cap is 1000 features whatever limit asks for, and the response carries numberReturned but no numberMatched — so the ordinary "a short page means the last page" loop stops at a thousand and reports nothing, which is the truncation trap building-identity-and-bag.md already records for the BAG WFS. And offset is not supported: it answers 400 unknown query parameter(s) found: offset, so the only way through is the rel="next" link.

And it changes only the data behind the picture, not the picture. geobron_nm shows the geometry is largely BGT-derived and so more accurate than OSM's — but the client draws a constant-width ribbon around whatever centreline it is given, so a decimetre-accurate centreline under an invented width is invisible.

Two pointers, with what was and was not verified

Both are what somebody will reach for NWB expecting; neither is wired.

How every number above was measured

All read-only, all run 2026-08-29 from the agent container.

B=https://api.pdok.nl/rws/nationaal-wegenbestand-wegen/ogc/v1

curl -sL "$B?f=json" | jq '.links[] | select(.rel=="license")'   # CC0 1.0
curl -sL "$B/collections?f=json" | jq -r '.collections[].id'     # two collections
curl -sL "$B/collections/wegvakken/schema?f=json" | jq '.properties.geometry'

# Volume: follow rel="next" until absent, summing .features|length and the byte
# count of each response body. 2 requests, 1000 + 392 features, 2,033,782 bytes.
curl -sL "$B/collections/wegvakken/items?bbox=6.555,53.207,6.580,53.222&limit=1000&f=json"

# rel_hoogte, first page only (no paging — the null share is the point).
curl -sL "$B/collections/wegvakken/items?bbox=5.045,52.060,5.085,52.085&limit=400&f=json" \
  | jq '[.features[].properties.rel_hoogte] | group_by(.) | map({v:.[0],n:length})'

# WEGGEG lane coverage over the same city box → 2.
curl -sL "https://api.pdok.nl/rws/weggegevens/ogc/v1/collections/wegvak_rijstroken/items?bbox=6.555,53.207,6.580,53.222&limit=500&f=json" \
  | jq '.features | length'