Friday, 20 May 2016

Calculating average slope from line using QGIS?


I have a raster dem from which I've created a slope. Then I'd like to calculate the average and maximum slope on each of some vector lines. I have a vague memory that I have seen a plugin for this but right now I can't seem to find it?



Basically I'm looking for something like the Zonal Statistic Plugin but instead of a polygon, I want to use lines.



Answer



This is an approach using qProf plugin, which provides slope value at the specified (equal) interval along the line.


enter image description here


Choose Export tab and you will find Topographic profile data option, and then export the data as .csv. Your csv file will have a dirslop column which shows the slope along the line.


Notice it is negative when the slope (between measurement) is upward. Calculate absolute slope first and then average and maximum on your spreadsheet.


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...