trails/openspec/changes/planner-route-encoding
Ullrich Schäfer b81108b10b
feat(map-core): compact route codec (polyline + RLE) for planner doc
Task group 1 of planner-route-encoding. Framework-free `route-codec.ts`:
- encodePolyline/decodePolyline — fixed-precision (1e5) delta + zig-zag
  varint + base64; lossless to ~1 m, version-tagged ("p1:").
- encodeRuns/decodeRuns — run-length codec for the per-coordinate
  road-metadata channels, tagged ("r1:").
- isEncodedPolyline/isEncodedRuns — so the read path (group 3) tells the
  new encoding apart from legacy JSON.

Not yet wired into route-data.ts (groups 2–3). Verified: map-core
typecheck + lint clean, 52/52 tests (round-trip within 1 m, empty/single,
RLE collapse, >3x smaller than JSON).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 16:55:34 +02:00
..
specs/planner-route-encoding docs(openspec): propose planner-route-encoding change 2026-07-14 09:31:58 +02:00
.openspec.yaml docs(openspec): propose planner-route-encoding change 2026-07-14 09:31:58 +02:00
design.md docs(openspec): propose planner-route-encoding change 2026-07-14 09:31:58 +02:00
proposal.md docs(openspec): propose planner-route-encoding change 2026-07-14 09:31:58 +02:00
tasks.md feat(map-core): compact route codec (polyline + RLE) for planner doc 2026-07-15 16:55:34 +02:00