feat: override which turn arrow a lane shows
The arrow on a lane came from the OSM turn:lanes tag with no way to change it, and a lane the tag skipped got no arrow at all. lane-maneuver is a v1 override that sets it. v1 rather than a v2 constraint, because "which arrow" is a discrete attribute of a lane with no station to anchor to, while every v2 anchor is positional. The existing road override already covers OSM-derived values this way — laneCount, width, sidewalks — and this is the same kind of thing. Arrow *placement* is the positional half and stays out; it also still has an open question about whether a group is a lane or a single arrow. Three behaviours, each measured against compiled output: an override replaces the tag's maneuver, it adds arrows to a lane the tag never marked, and '' removes one the tag asked for. The empty string is therefore distinguished from "no override" rather than falling through to the tag. An empty override set leaves the arrows byte-identical and the fixtures untouched. Validation lists the accepted maneuvers and rejects anything else, including correctly-spelled components in the wrong order. It cannot be left to normalizeManeuver(), which returns unrecognised input unchanged — a typo would otherwise reach the template lookup and silently produce no arrow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
15d41be444
commit
335c8ea68a
7 files changed
+173
-2
No files matched your search
@@ -0,0 +1 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
Reference in new issue
Block a user