recon/lib/offroute
Matt 1a9dfc8f8d feat(offroute): Phase O3b — trail entry index, Valhalla stitching, /api/offroute endpoint
Phase A: Trail Entry Point Index
- Extract highway endpoints from idaho-latest.osm.pbf using osmium + ogr2ogr
- Store 740,430 entry points in /mnt/nav/navi.db (SQLite with spatial index)
- Entry points by class: service (271k), footway (152k), residential (146k),
  track (111k), path (26k), unclassified (16k), tertiary (9k), secondary (4k),
  primary (4k), bridleway (15)

Phase B: Pathfinder → Valhalla Stitching (router.py)
- OffrouteRouter orchestrates wilderness pathfinding + Valhalla on-network routing
- Queries entry points within 50km (expanding to 100km if needed)
- MCP pathfinder routes to nearest reachable entry point
- Calls Valhalla pedestrian/bicycle/auto costing for on-network segment
- Returns GeoJSON FeatureCollection with wilderness + network + combined segments

Phase C: Flask Endpoint
- POST /api/offroute with start/end coordinates, mode, boundary_mode
- Returns GeoJSON route with per-segment metadata and turn-by-turn maneuvers

Validated: 42.35,-114.30 → Twin Falls downtown
- Wilderness: 0.5km, 9min | Network: 36km, 413min | Total: ~421min
- 21 turn-by-turn instructions, segments connect at entry point

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 13:44:34 +00:00
..
__init__.py feat(offroute): Phase O1 foundation — PMTiles decoder, Tobler cost, MCP pathfinder prototype 2026-05-07 23:43:56 +00:00
barriers.py feat(offroute): Phase O2c — PAD-US barriers with three-mode boundary respect 2026-05-08 06:56:36 +00:00
cost.py feat(offroute): Phase O3a — trail burn-in, pathfinder seeks trail corridors 2026-05-08 07:26:25 +00:00
dem.py feat(offroute): Phase O1 foundation — PMTiles decoder, Tobler cost, MCP pathfinder prototype 2026-05-07 23:43:56 +00:00
friction.py feat(offroute): Phase O2b — WorldCover friction integration, lake avoidance validated 2026-05-08 06:33:45 +00:00
prototype.py feat(offroute): Phase O3a — trail burn-in, pathfinder seeks trail corridors 2026-05-08 07:26:25 +00:00
router.py feat(offroute): Phase O3b — trail entry index, Valhalla stitching, /api/offroute endpoint 2026-05-08 13:44:34 +00:00
trails.py feat(offroute): Phase O3a — trail burn-in, pathfinder seeks trail corridors 2026-05-08 07:26:25 +00:00