garage44.eu/jeroen/cartopolis

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

.. /docs/notes/navigation-marks.md

raw


topic: navigation-marks triggers: [nav_marks.rs, vaarwegmarkeringen, Rijkswaterstaat, buoy, buoys, beacon, "navigation marks", boei, kribbaken, topmark, obj_vorm, obj_kleur, naut_funct, body_mentions_water, MarkColour] updated: 2026-08-30

Navigation marks (Rijkswaterstaat vaarwegmarkeringen)

Every buoy and fixed beacon on the Dutch national waterways, each with the shape and colour pattern that say which side of it to pass, the topmark that says what it marks, and the colour of the light it shows. cartopolis_geo::nav_marks is the pure half, systems::nav_marks the fetching half.

The interface, and what it costs

https://api.pdok.nl/rws/vaarwegmarkeringen-nederland/ogc/v1 — keyless OGC API Features, bbox query, GeoJSON out (storage CRS EPSG:28992, CRS84 is what comes back by default, longitude first). Note the path: the obvious …/rws/vaarwegmarkeringen/… is a 404.

Two collections: vaarweg_markeringen_drijvend_rd (floating — buoys) and vaarweg_markeringen_vast_rd (fixed — beacons, groyne marks, shore lights).

Access-Control-Allow-Origin: * and Cache-Control: public, max-age=3600, so the web build reaches it directly like systems::aerial and unlike systems::height. limit is capped at 1000. properties= subsetting is a 400, so the whole ~40-property (floating) or ~90-property (fixed) feature comes down whatever you ask for — which is why the client caches a compacted form rather than the response.

Licence: CC0 1.0, stated by the service's own license link. No obstacle to caching or redistributing what we hold.

Volume, measured 2026-08-30

National bbox 3.0,50.6,7.4,55.7:

collectionfeaturespagesraw GeoJSONwall clock
floating10,105119.6 MB3 s
fixed8,369918.2 MB4 s

Per z14 cell — the zoom map_geometry streams geometry at, and the one a mark is meshed into:

cellmarksraw
Nijmegen, the Waal (8458, 5422)4357.3 KB
Hollands Diep (8399, 5434)34.6 KB
Amsterdam, het IJ (8415, 5383)23.7 KB
Rotterdam, Nieuwe Maas (8396, 5418)12.8 KB
Groningen, Grote Markt (8490, 5320)01.9 KB (two empty answers)

The Groningen row is the one the design turns on: an empty cell is not free, and most of a streamed ring is empty. Hence the two gates below.

The vocabularies, censused

998 floating and 260 fixed marks over five boxes (the Waal, the IJsselmeer, het IJ, the Nieuwe Maas, Hollands Diep), 2026-08-30. The numbers matter because nav_marks.rs parses these by rule rather than from a lookup table, and the census is what says the rule covers the register.

Two gates, and why they are the whole cost argument

load_marks_cell asks the register for a cell only when both hold:

  1. The cell overlaps the collections' own extent.spatial.bbox (2.354, 50.714, 7.555, 55.669). Coverage is an envelope, never a status code — the rule aerial.rs states for the same service.
  2. The cell's tile carries a water layer. A mark stands in a fairway.

The second one reads the undecoded MVT body (vector_tiles::body_mentions_water) rather than a parse, and that is a deliberate departure from how every other consumer of a tile works here. map_geometry fetches a cell's tile on the I/O pool and hands the bytes to a worker to parse (ADR-033); a fetch decision that waited for the parse would move a ~120 ms decode onto the frame loop on wasm. The probe is a substring search for the layer names, and its asymmetry is what makes it safe: a layer that exists cannot fail to be mentioned, because MVT stores each layer's name verbatim in the body. A false positive costs one request; a false negative is impossible.

The Furniture toggle is a third gate, applied by map_geometry: with the layer off, nothing is fetched at all.

A fourth is about the service rather than the cell — a 3 s bound on each request and a per-service breaker with a minute's cooldown, because this fetch sits between the cell's tile and its tessellation worker and the register owns none of what waits behind it. It is shared with the level crossings and is written down once, in optional-layers-on-the-critical-path.md.

Two rejected alternatives

An atlas extractor. The other Dutch registers are extracted by atlas (crates/atlas/src/pipeline/; a separate TypeScript repository when this was decided) and served per cell by our own host, and where-the-map-data-is-built.md is explicit that each format is still hand-synced between the extractor and its client parser. That seam is worth its cost for a 2 MB-per-cell dataset needing reprojection and triangulation; it is not worth it for 18,474 points behind a keyless bbox query with CORS * and an hour of cache control. The in-tree precedent for reaching PDOK from the client is systems::height (AHN) and systems::aerial; for a per-cell third-party streamer it is systems::tall_structures.

A coverage manifest. systems::coverage's CoverageSlot answers "which cells does our host serve", which is not a question here. Coverage is the envelope above.

What is deliberately not drawn

The palette bends here, on purpose

furniture.rs states the rule the rest of that group follows — the map is pale cartographic paper and a saturated bench is the loudest thing on screen. A navigation mark is the one form in the group where the colour is the datum: a red can and a green cone mean opposite things and differ in nothing else at 40 m. So MarkColour::rgb is a set of muted signal colours rather than the furniture greys, still knocked well back from the fluorescent paint of the real thing.

Not verified on a screen

Written and tested in a container with no GPU beyond lavapipe, where colour and lighting are not evidence (headless-shots-software-renderer.md). The geometry half is judgeable there — count, placement on the water rather than the bank, the fade band — and nav_marks in --dump-state is the number that separates "the layer arrived" from "this water has none". Whether the tones read correctly, and whether a 1.4 m buoy is legible at the distance the Furniture fade starts, wants an eye on real hardware.