recon/lib/offroute
Matt 2252905986 feat(offroute): MVUM legal access — pathfinder integration + places panel API + boundary_mode control
MVUM Data Import:
- Downloaded USFS MVUM Roads (150,636 features) and Trails (28,741 features)
- Imported to navi.db as mvum_roads and mvum_trails tables
- Idaho coverage: ~8,994 roads and ~4,504 trails across 7 national forests
- Preserved all vehicle-class fields (ATV, MOTORCYCLE, HIGHCLEARANCEVEHICLE, etc.)
- Preserved seasonal date ranges (*_DATESOPEN fields)

New mvum.py module:
- MVUMReader class for querying MVUM data by bbox and nearest point
- parse_date_range() for seasonal date string parsing (MM/DD-MM/DD format)
- check_access() for determining open/closed status with date checking
- symbol_to_access() fallback when per-vehicle fields are null
- get_mvum_access_grid() for rasterizing MVUM to pathfinder grid

Cost function integration:
- Added mvum parameter to compute_cost_grid()
- MVUM closures respond to boundary_mode:
  * strict = impassable (np.inf)
  * pragmatic = 5x friction penalty
  * emergency = ignored entirely
- Foot mode skips MVUM (motor-vehicle specific)

Router integration:
- Loads MVUM access grid for motorized modes (mtb, atv, vehicle)
- Tracks mvum_closed_crossings in path summary

Places Panel API:
- GET /api/mvum?lat=XX&lon=XX&radius=50
- Returns MVUM feature with access status for all vehicle classes
- Includes seasonal date ranges, maintenance level, forest/district info
- GeoJSON geometry for map display

Validation:
- MVUM places endpoint tested with Sawtooth NF road
- All four modes validated with strict/pragmatic/emergency boundary modes
- Foot mode correctly ignores MVUM restrictions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-08 14:26:18 +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 O4 — multi-mode cost functions (foot/mtb/atv/vehicle) 2026-05-08 14:11:56 +00:00
cost.py feat(offroute): MVUM legal access — pathfinder integration + places panel API + boundary_mode control 2026-05-08 14:26:18 +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
mvum.py feat(offroute): MVUM legal access — pathfinder integration + places panel API + boundary_mode control 2026-05-08 14:26:18 +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): MVUM legal access — pathfinder integration + places panel API + boundary_mode control 2026-05-08 14:26:18 +00:00
trails.py feat(offroute): Phase O3a — trail burn-in, pathfinder seeks trail corridors 2026-05-08 07:26:25 +00:00