Repository navigation
Publish the off-trail numbers as data, not only as prose - #10
Merged
Merged
Conversation
A resupply point's description says "70.0 km off trail" and "Accepts resupply boxes", and a planner wanting to act on either has to parse English out of it. The turnoff waypoint says the same thing again in its own sentence. Neither is something a program should be reading. So both waypoints now carry an `<extensions>` block in a `tn:` namespace of our own: `offTrailKm`, `acceptsBoxes`, and `accessMode` and `accessName` where `data/resupply.json` has them - which today is nowhere, so those two elements are simply absent rather than guessed. The turnoff declares the same block as the place it serves, so either waypoint on its own says how far away the other is, and `offTrailKm` is read off the same `offTrailMeters` the description sentence is written from, so the prose and the data cannot drift apart. `writeGpx` has no hook for extensions, so they go in by position afterwards, with the waypoint counts checked against each other rather than trusted. The block is last in each `<wpt>`, where GPX 1.1 wants it, every element in it is optional, and a reader that does not know the namespace ignores the whole thing: every waypoint in the file is byte-identical to the last build except for gaining one, and no CSV moves at all. `accessName` and `accessMode` are now read from `data/resupply.json` where present. Filling them in is the most useful correction anyone can send. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016zeWKEHNbEm4J3KZLwKPvy
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.
Adds GPX
<extensions>under thetn:namespace (offTrailKm,acceptsBoxes, andaccessMode/accessNamewhen the source has them) to every resupply site and its turnoff. No waypoint is renamed, retyped or moved;<wpt>count unchanged. Consumed by trail-maps' resupply selection (plans/resupply-selection.md).🤖 Generated with Claude Code
https://claude.ai/code/session_016zeWKEHNbEm4J3KZLwKPvy