Seeking Advice: Tools for Fine-Grained Path Gradient Analysis

I am in search of a tool capable of generating gradient metrics for all mountain paths in my vicinity. This tool would enable me to pinpoint paths with moderate gradients, making them potentially suitable for mountain and dirt bikes.

The program would take input, such as an overpass query listing all paths in my area. For each path, it would utilize SRTM data to calculate the approximate maximum gradient between all nodes. Additionally, there could be an option to update the incline=* tag value for each node.

The final output would consist of Tile Overlay Images that can be visualized on a customized web map. These images would highlight differently colored segments based on the computed gradient values.

While some apps like OsmAnd and Komoot can compute and display this gradient data, they are limited to preselected itineraries / GPX files. It is crucial for me to visualize this data for any paths in my area.

I’ve come across online resources (python scripts) that calculate average/min/max gradient for the entire path/road segments, but I require something more detailed (node level). Occasionally, only a brief section may be too steep for two-wheeled vehicles, but the path might offer a suitable detour before and after.

Does anyone have experience with this? Any guidance or suggestions would be greatly appreciated.

Based on some existing work I found, I ended up building my own Node.js script that takes an .osm.pbf file as input with additional parameters (gradient stops/colors and query filters) and generates GeoJSON and KML outputs.

I can then visualize data in geojson.io or Google Earth for further analysis:

If you find value in this script, don’t hesitate to contribute by submitting issues and pull requests.