feat(route-builder): densify + elevate off-trail segments
With "snap to route" off, every waypoint pair shipped as a 2-point linear segment with no `<ele>` anywhere — the page only enriched elevations inside the snap path. The resulting GPX had a flat altitude profile and the build script's gain/loss/min/max metrics came out all zero. Two changes: * New `densifyLinearSegments` (default 25 m, matches Swisstopo's coarsest DTM) walks every 2-point segment and seeds intermediate vertices along the great circle. Snapped segments (already many points from BRouter) are left alone. * Page reactor now runs the same Swisstopo elevation enrichment in the autoSnap-off path, so the GPX carries per-trkpt `<ele>` even for fully manual / cross-country routes. Elevation source unchanged: Swisstopo profile.json (COMB → DTM2 → DTM25 fallback) is already the highest-resolution provider for our Swiss-coverage hikes; no point swapping. Also unifies the snap-path's inline enrichment call into the same helper so there's one elevation code path instead of two.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "homepage",
|
||||
"version": "1.75.5",
|
||||
"version": "1.76.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user