Using SRTM altitude information and OpenStreetmap roads, I want to calculate altitude differences (sum of meters uphill and downhill separated = two values) per road element.
What would be the fastest way to achieve this?
|
Using SRTM altitude information and OpenStreetmap roads, I want to calculate altitude differences (sum of meters uphill and downhill separated = two values) per road element. What would be the fastest way to achieve this? |
||||
|
|
|
Dylan Beaudette has an article on calculating raster profiles along a line segment that may prove helpful. The basic approach is to convert the lines information into regularly spaced points with
From there, you could use a shell script, R, or Python to calculate the distance differences. In Python, that might look something like:
This is just an example for a single road, but could be scripted to run repeatedly across many roads. |
|||
|
|