I am working on a series of footpath routes and have been asked if it possible to calculate the total ascent that a walker would have climbed if the travelled along each route?

I know that it is simply not a case of max-min because the footpath is not just one single climb but has many stages where the path ascends and descends.

Presently, I have the data as a series of polylines and an underlying dtm in ArcGIS but do not have a spatial analyst extension.

I have GRASS GIS and QGIS too so quite happy to consider external methods if this will help answer the question.

  • The QGIS Climb Processing Plugin (plugins.qgis.org/plugins/Climb) does exactly what you want. It can use a DEM to calculate the total climb (and total descent) for each line in an input dataset. From the documentation "The total climb and descent along the line geometries of the input line layer are calculated using the Z values for the points making up the lines. Z values can be provided by the line geometries or a DEM (by using the Drape (set z-value from raster) algorithm to assign Z values to the points that make up the lines)." Apr 29, 2019 at 9:49
  • What was your reason for closing this as "too broad", @PolyGeo? To me this question looks fine and to the point. Apr 29, 2019 at 10:17
  • @HåvardTveite it's asking how to do something in ArcGIS, QGIS, GRASS or ... If asked today we would try to get it focused before being answered. Being closed makes no difference to voting or it staying on the site.
    – PolyGeo
    Apr 29, 2019 at 10:40
  • @HåvardTveite if you are wanting to add your comment as an answer simply write a new self-answered Q&A where the question is targeted for your solution. It will enable you to provide a focused answer to a focused question and gain rep from both.
    – PolyGeo
    Apr 29, 2019 at 10:47
  • Thank you for explaining your reasons for closing, @PolyGeo! I still think that it should be OK to describe a problem, and then ask for solutions that are not limited to a specific type of software. This situation is quite normal - you have a problem, and you have access to various types of software. Apr 29, 2019 at 20:15

5 Answers 5


Here's a GRASS solution: How to calculate difference in altitude along lines using GRASS?

Worked great for me.


A nice, fun problem. I'm not sure if you have access to FME or to the Data Interoperability Extension, but if so I felt inspired to create an FME solution, and you can find details about it on my FME Evangelist blog.

If not, maybe others will find this (or the methodology) useful.

FME Workspace


First convert your line layer into a point layer. You could do this with either the Feature Vertices To Point tool in ArcGIS or Polyline to Point tool using ET GeoWizard. Once you have a point layer in QGIS you can use the Point sampling tool to extract the elevation data from a raster. Below is a tutorial showing you how to use the Point sampling tool in QGIS. You can then calcuate the elevation difference from the starting and ending point vertices for each path.

How to sample raster datasets using points in Quantum GIS (QGIS)


might try GPS Visualizer's "Draw a profile" tool: Draw a profile


I think the easiest solution is to calculate total ascent is to use excel, method below:

  1. Convert the line to points
  2. Export the data to a format compatible with excel
  3. Make sure the track is going from start to finish - if not then reorder the data
  4. Enter the formuala "=RC(-1)-R(-1)C(-1), to work out the altitude change between each point, then apply to all rows in the table
  5. Use the Excel function "Filter" to select all those values that are positive
  6. Add up all of the positive values
  7. This should be equal to the total ascent along the route
  • 1
    Whatever works! I think the other solutions offered are likely going to be more robust/reusable than Excel, however.
    – blah238
    Aug 12, 2011 at 20:53

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