1

I want to calculate the slope of a forest road in mountainous areas.
No problem with ArcGIS following the instructions of the following post:

(see comment of user 'FelixIP')
How do I find the slope of road segments with point elevation data of the same linear path

Summary:
1.) split line (forest road) into equal lengths segments
2.) convert segments to 3D shapes (Interpolate shape tool)
3.) calculate slope of each segment with the field calculator ->

  abs( !Shape!.lastPoint.Z- !Shape!.firstPoint.Z)/ !Shape!.length*100

The output are slope values for every line segment of that polyline. In the attribute table, every segment has its individual slope value now.

This works with ArcGIS. Now I would like to do the same with QGIS.
I tried to use the point sampling tool, tried to rasterize the polyline, tried 'QChainage', the Topology checker and the pProf plugin but it didn't bring the expected results.

6

In the QGIS Processing Toolbox, there are GRASS tools v.split.length and v.drape (using QGIS 2.18.16).

Before starting;

0.) make sure your DEM and road data are projected onto the same CRS.

Then, following your summary workflow:

1.) split line (forest road) into equal lengths segments

v.split.length will give you a new layer Split by length by default.

2.) convert segments to 3D shapes (Interpolate shape tool)

v.drape will give you a new 3D vector layer.

3.) calculate slope of each segment with the field calculator

abs(z(start_point($geometry)) - z(end_point($geometry)))/$length*100

  • First i struggeld with the v.drape tool. The tool did run but i wouldn't generate any outcome. I realized only then that the file path contained a 'ü' letter and thats why it didn't work. Thanks for your help everybody. – Quarantäne Mar 5 '18 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.