8

I am working in QGIS 2.18.0.

I have a problem regarding calculation of line lengths in combination with raster files, to be precise with DEM raster.

There is not a problem to calculate the line lengths (vector layer), but this calculation assumed the surface to be flat (or not?). By doing this that way I will calculate the length of the "cathetus", and I need the length of the "hypotenuse".

Is there any add-on or is there any formula to calculate the line length that incorporates the change in the altitude?

Maxima
  • 1,701
  • 7
  • 18
Josip G
  • 125
  • 9

1 Answers1

6

There is a SAGA Profiles from lines tool, which is accessible from QGIS Processing Toolbox | SAGA | Terrain Analysis - Profiles.

enter image description here

Just give it your DEM (raster) and the line (vector) layers. It will return a new point layer (Profiles) in which attribute table you will find DIST_SURF field. It shows the cumulative length following DEM surface (your "hypotenuse") from the startpoint.

enter image description here

Kazuhito
  • 30,746
  • 5
  • 69
  • 149