Tuesday 18 September 2018

qgis - calculate slope of lines between nodes?


I need to calculate the mean slope of roads between nodes with QGIS. I have a DEM and a vector (PostGIS) with the roads, nodes are additionally displayed as point shape and also contain an elevation field derived from DEM:


enter image description here


I am looking for the mean slope between those nodes which are connected with a line.


As there are many roads to calculate (see the picture below), I need a workflow which processes all calculations at once.Either output as raster (with slope values on the roads and NoData for others) or shapefiles containing the the slope are useful for my purpose.


How can I do this?


enter image description here


I have a ArcGIS solution in mind (3D Analyst / interpolate shape), but I'd prefer a QGIS / open source solution!



I tried the Profile Tool Plugin, which only processes one line at once. Further, I was thinking of using a slope raster and failed because of the direction of the slope (contour line streets).


I was looking for other approaches, but it didn't work or I didn't understand them, e.g.:





No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...