Repository navigation
Say what a turnoff leads to, not just that it is one - #9
Merged
Merged
Conversation
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
2 tasks
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
-accesson the end:hut-accesstown-accesscampsite-accessresupply-accessaccommodation-accessfood-accesscaravan-park-access31 of the 70 turn out to serve somewhere you can buy food.
Why not just
townBoth 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
townwould 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 whataccessfailed to say.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
-accessfamily to its waypoint taxonomy sotown-accesscounts as resupply andhut-accessdoes not, and renders the two distinctly.🤖 Generated with Claude Code
https://claude.ai/code/session_01GXxFCp8DVN7ecj89aa1gcG