Skip to content

Say what a turnoff leads to, not just that it is one - #9

Merged
eamon-b merged 1 commit into
mainfrom
access-served-type
Sep 10, 2026
Merged

eamon-b merged 1 commit into
mainfrom
access-served-type

Conversation

@eamon-b

@eamon-b eamon-b commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Every turnoff was typed access, which says where you are standing and nothing about why you would stop.

A consumer deciding whether a walker can buy food at a point has no way to tell Te Anau's turnoff from Blyth Hut's, so either all 70 count as resupply — 39 of them phantom food stops at huts and campsites — or none do. Downstream, none did: trail-maps reads a 271.7 km carry from Queenstown to Riverton, with Te Anau, Mossburn, Nightcaps, Tuatapere, Otautau and Colac Bay all inside it, because every one of those is off the route and only its turnoff is on it.

A turnoff now carries the type of the site it serves with -access on the end:

type count
hut-access 17
town-access 16
campsite-access 12
resupply-access 10
accommodation-access 6
food-access 5
caravan-park-access 4

31 of the 70 turn out to serve somewhere you can buy food.

Why not just town

Both halves of the name are load-bearing. A walker reading the list needs to know that "Te Anau turnoff" is a roadside on the trail and that Te Anau is 22 km away; a consumer that typed it plainly town would put a town on the route that is not there, and the on-trail/off-trail distinction — which is the thing a hiker actually plans around — would be gone.

Keeping the distinction in the type rather than in a new field also means it travels everywhere <type> already travels: the GPX, every reader that honours it, and the datasheet. Nothing new to parse, and no schema change.

The (town) already in each turnoff's description now agrees with its type rather than restating what access failed to say.

<wpt lat="-35.221238" lon="173.945947">
  <ele>39</ele>
  <name>Kerikeri turnoff</name>
  <cmt>Mangakaretu to Kerikeri</cmt>
  <desc>km 221.6 | Leave the trail here for Kerikeri (town), 0.7 km off trail. | New World and Countdown. Full resupply, hostels.</desc>
  <type>town-access</type>
</wpt>

Scope

One line in the emitter, plus the assertion that counts turnoffs in the GPX and the generated file-table row in the README. Route geometry, chainage, the resupply plan and both datasheets are byte-identical — the only outputs that move are the four GPX files and meta.json's timestamp. 41 tests pass.

The consuming change is eamon-b/trail-maps#68, which adds the -access family to its waypoint taxonomy so town-access counts as resupply and hut-access does not, and renders the two distinctly.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GXxFCp8DVN7ecj89aa1gcG

Every turnoff was typed `access`, which says where you are standing and
nothing about why you would stop. A consumer deciding whether a walker can
buy food at a point has no way to tell Te Anau's turnoff from Blyth Hut's,
so either all 70 count as resupply - 39 of them phantom food stops at huts
and campsites - or none do. Downstream, none did: trail-maps reads a 271.7
km carry from Queenstown to Riverton with Te Anau, Mossburn, Nightcaps,
Tuatapere, Otautau and Colac Bay all inside it, because every one of those
is off the route and only its turnoff is on it.

A turnoff now carries the type of the site it serves with `-access` on the
end: `town-access`, `resupply-access`, `food-access`, `hut-access`,
`campsite-access`, `accommodation-access`, `caravan-park-access`. 31 of the
70 turn out to serve somewhere you can buy food.

Both halves of that name are load-bearing, which is why this is not simply
`town`. A walker reading the list needs to know that "Te Anau turnoff" is a
roadside on the trail and Te Anau is 22 km away, and a consumer that treats
the two the same would put a town on the route that is not there. Keeping
the distinction in the type rather than in a new field also means it travels
everywhere `<type>` already travels - the GPX, every reader that honours it,
and the datasheet - without anything new to parse.

The `(town)` already in each turnoff's description now agrees with its type
rather than restating what `access` failed to say.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXxFCp8DVN7ecj89aa1gcG
eamon-b added a commit to eamon-b/trail-maps that referenced this pull request Sep 9, 2026
Upstream now types each turnoff by what it serves - `town-access`,
`hut-access` - instead of a flat `access` (eamon-b/te-araroa-data#9). That
carries two facts in the one field that already travels everywhere: what
kind of place it is, and that you are standing at the roadside rather than
at the place. This is the consuming half.

`town-access`, `food-access` and `resupply-access` join RESUPPLY_TYPES, and
the plan stops lying. It read a 271.7 km carry from Queenstown to Riverton -
about thirteen days of food - with Te Anau, Mossburn, Nightcaps, Tuatapere,
Otautau and Colac Bay all inside it, every one of them off the route with
only its turnoff on it. The longest carry on the trail is now Te Kūiti to
Taumarunui at 160.9 km, which is a real one.

They are listed one by one rather than derived by stripping the suffix, and
that is deliberate. A `water-access` satisfying `isWaterWaypoint` would tell
the carry calculator there is water on the route when it is down a side
road, and under-reporting a dry stretch is the dangerous direction to err -
the codebase leans that way everywhere else and this does not break the
habit. Turnoffs to huts, campsites, accommodation and caravan parks are
absent for the same reason `hut` and `campsite` are.

One type becoming seven could have meant fifty-six new entries across eight
maps that enumerate types by hand - two icon maps on the web, two on mobile,
the chip classes, the CSS, the colour tokens, the "next town ahead" HUD - and
another eight for whatever upstream adds next. Instead `baseWaypointType()`
gives each of them a one-line fallback: a turnoff renders as the place it
serves. The chip keeps the served type's colour and gains an outline, so the
colour says what kind of place and the outline says you are not there yet.

`isAccessWaypoint()` is for the places a turnoff must behave differently
rather than merely look different. There is one: you cannot sleep at a
roadside, so `overnightWaypoints` excludes them even though `hut-access`
colours as a hut.

The part with teeth is `data/waypoint-ids.json`. Ids are matched by type plus
100 m proximity, so changing the emitted type would have failed to match all
70 turnoffs, minted 70 fresh ids, and left the old entries as orphans -
silently, with no test able to see it, and every server-side comment keyed to
those ids pointing at nothing. The 70 entries are retyped in this commit;
name and coordinates identify them unambiguously. The diff is 70 `"type"`
lines and nothing else, and the rebuild mints no new id.

Also fixes two things this made conspicuous rather than caused: the mobile
waypoint list rendered `wp.type` raw, so rows would have read
`caravan-park-access`, and the taxonomy test's list of "types actually in the
generated output" had never been updated for `gap` or the turnoffs - the one
test whose whole purpose is to catch this.

The te-araroa-data dependency points at the `access-served-type` branch until
eamon-b/te-araroa-data#9 lands; re-point it at `#main` on merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXxFCp8DVN7ecj89aa1gcG
@eamon-b
eamon-b merged commit c0f0c17 into main Sep 10, 2026
1 check passed
eamon-b added a commit to eamon-b/trail-maps that referenced this pull request Sep 10, 2026
The Vercel preview has failed since the route stopped being committed:
`npm run build` never ran `sync:te-araroa`, so on a fresh checkout
`build:trails` stopped at "GPX file not found: te-araroa-sobo.gpx". The
sync is now the first step of `build`.

Te Araroa was also the one trail without a committed climate.json, so
every deploy fetched eight locations from Open-Meteo - rate-limited twice
in a local run, and the page shipped `climate: null` wherever it had not.
It is committed now like every other trail's, and the mobile asset is
rebuilt to carry it (climate is the only change in it).

te-araroa-data moves from the access-served-type branch to main, now
that eamon-b/te-araroa-data#9 has landed as c0f0c17. Its out/ is
byte-identical to the commit previously pinned, so the route and the
generated JSON do not change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HjLSAiVRaLWa3eNSq9eNQK
eamon-b added a commit to eamon-b/trail-maps that referenced this pull request Sep 12, 2026
Upstream now types each turnoff by what it serves - `town-access`,
`hut-access` - instead of a flat `access` (eamon-b/te-araroa-data#9). That
carries two facts in the one field that already travels everywhere: what
kind of place it is, and that you are standing at the roadside rather than
at the place. This is the consuming half.

`town-access`, `food-access` and `resupply-access` join RESUPPLY_TYPES, and
the plan stops lying. It read a 271.7 km carry from Queenstown to Riverton -
about thirteen days of food - with Te Anau, Mossburn, Nightcaps, Tuatapere,
Otautau and Colac Bay all inside it, every one of them off the route with
only its turnoff on it. The longest carry on the trail is now Te Kūiti to
Taumarunui at 160.9 km, which is a real one.

They are listed one by one rather than derived by stripping the suffix, and
that is deliberate. A `water-access` satisfying `isWaterWaypoint` would tell
the carry calculator there is water on the route when it is down a side
road, and under-reporting a dry stretch is the dangerous direction to err -
the codebase leans that way everywhere else and this does not break the
habit. Turnoffs to huts, campsites, accommodation and caravan parks are
absent for the same reason `hut` and `campsite` are.

One type becoming seven could have meant fifty-six new entries across eight
maps that enumerate types by hand - two icon maps on the web, two on mobile,
the chip classes, the CSS, the colour tokens, the "next town ahead" HUD - and
another eight for whatever upstream adds next. Instead `baseWaypointType()`
gives each of them a one-line fallback: a turnoff renders as the place it
serves. The chip keeps the served type's colour and gains an outline, so the
colour says what kind of place and the outline says you are not there yet.

`isAccessWaypoint()` is for the places a turnoff must behave differently
rather than merely look different. There is one: you cannot sleep at a
roadside, so `overnightWaypoints` excludes them even though `hut-access`
colours as a hut.

The part with teeth is `data/waypoint-ids.json`. Ids are matched by type plus
100 m proximity, so changing the emitted type would have failed to match all
70 turnoffs, minted 70 fresh ids, and left the old entries as orphans -
silently, with no test able to see it, and every server-side comment keyed to
those ids pointing at nothing. The 70 entries are retyped in this commit;
name and coordinates identify them unambiguously. The diff is 70 `"type"`
lines and nothing else, and the rebuild mints no new id.

Also fixes two things this made conspicuous rather than caused: the mobile
waypoint list rendered `wp.type` raw, so rows would have read
`caravan-park-access`, and the taxonomy test's list of "types actually in the
generated output" had never been updated for `gap` or the turnoffs - the one
test whose whole purpose is to catch this.

The te-araroa-data dependency points at the `access-served-type` branch until
eamon-b/te-araroa-data#9 lands; re-point it at `#main` on merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GXxFCp8DVN7ecj89aa1gcG
eamon-b added a commit to eamon-b/trail-maps that referenced this pull request Sep 12, 2026
The Vercel preview has failed since the route stopped being committed:
`npm run build` never ran `sync:te-araroa`, so on a fresh checkout
`build:trails` stopped at "GPX file not found: te-araroa-sobo.gpx". The
sync is now the first step of `build`.

Te Araroa was also the one trail without a committed climate.json, so
every deploy fetched eight locations from Open-Meteo - rate-limited twice
in a local run, and the page shipped `climate: null` wherever it had not.
It is committed now like every other trail's, and the mobile asset is
rebuilt to carry it (climate is the only change in it).

te-araroa-data moves from the access-served-type branch to main, now
that eamon-b/te-araroa-data#9 has landed as c0f0c17. Its out/ is
byte-identical to the commit previously pinned, so the route and the
generated JSON do not change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HjLSAiVRaLWa3eNSq9eNQK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant