recon/lib/offroute
Matt 3d2d69cd56 Switch /api/reverse/<lat>/<lon> elevation source from Valhalla to planet-DEM
Per OFFROUTE-ARCHITECTURE.md §9 ("planet-dem.pmtiles as single elevation
source"). The bundle endpoint previously called Valhalla /height, which only
has 48 Idaho HGT tiles; it now reads the planet-scale Terrarium PMTiles that
already back the frontend hillshade and contours.

- dem.py: add DEMReader.sample_point(lat, lon) — one z12 tile (LRU-cached),
  Web-Mercator pixel index, None outside the +/-85.05 pole cap or when untiled.
- netsyms_api.py: module-level DEMReader singleton (lazy mmap, None if init
  fails); _reverse_elevation now calls _DEM.sample_point; drop the Valhalla
  HTTP call and _VALHALLA_HEIGHT_URL.
- tests: DEM-mock and DEM-unavailable cases; EXPECTED_KEYS derives from
  _BUNDLE_KEYS. All 9 tests pass.

Verified live: Boise 824m, London 8m, Tokyo 35m, Yosemite 2804m, pole -> None.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 15:20:35 +00:00
..
__init__.py
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 Switch /api/reverse/<lat>/<lon> elevation source from Valhalla to planet-DEM 2026-05-20 15:20:35 +00:00
friction.py
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 offroute: wilderness maneuvers with bearing, elevation, grade 2026-05-09 05:05:00 +00:00
trails.py feat(offroute): Phase O3a — trail burn-in, pathfinder seeks trail corridors 2026-05-08 07:26:25 +00:00