Route elevation profile (climb, descent, max grade) from the terrain tiles, and reach (isochrones) in the route panel

This commit is contained in:
randy committed 2026-11-13 22:55:55 +01:00
1 parent b80575828a
commit cca985d2b9
10 files changed
+274 -26

No files matched your search

+13 -4
View File
@@ -2,7 +2,7 @@
:toc:
:toclevels: 1
Status: *phases 1–2 implemented* (the container and builds; the route panel, vehicle profile and saving a route); phase 3 proposed.
Status: *implemented* (the container and builds; the route panel, vehicle profile and saving a route; elevation profile and reach).
== Goal
@@ -157,9 +157,18 @@ serving swaps the tiles in, and a truck route with dimensions comes back.
. Container + build script + "Build routing" + status. Done when
`curl valhalla:8002/route` answers on the server.
. `/api/route`, the vehicle profile, the route panel, save to library.
. Elevation profile of the route (sampled from `terrain.pmtiles`, which
is already there, instead of Valhalla's own SRTM download), then
isochrones.
. Elevation profile of the route, then isochrones. Done:
* The browser samples the route every ≥50 m (at most 400 points) from
the same terrain tiles the hillshade uses (`dem.js`; from
`terrain.pmtiles` when it's there, else online), instead of
Valhalla's own SRTM download. The summary adds climb, descent and the
steepest grade sustained over 500 m. "Elevation profile" opens the
usual profile panel, and a saved route keeps the profile, so the
library shows it like a track's.
* `POST /api/isochrone` (`{"center": [lon, lat], "minutes": [...]}`,
1–4 times up to 240 min) returns Valhalla's polygons for the stored
vehicle. "Reach in" in the route panel draws them from the start
point, or from the map center when there are no points yet.
== Open questions