I'm new to GIS.

I have some tracks of people walking from point A to point B that I took using breadcrumbing with Garmin e-trex (set on the Auto track settings). I've loaded the tracks into QGIS and would like to calculate distance travelled along each track (cumulative distance is most important, but distance from trackpoint to trackpoint could also be useful). However, in the Attributes Table I can see only coordinates data, not distance data.

Is there any easy way to calculate distances travelled along tracks in QGIS?

  • Can you show screenshot from map & data ?
    – Shiko
    Commented Aug 18, 2016 at 10:00
  • GIS is not great for this stuff, line objects can't have geometric substructure like tracks need. If you will do this a bit it is worth learning R or Python or similar which are more flexible and provide better reproducibility.
    – mdsumner
    Commented Aug 18, 2016 at 12:58
  • I would suggest doing a little more research before asking a question here. Doing a quick search for "measure length in QGIS" got me to their tutorials page with a full tutorial on calculating line lengths and statistics in QGIS qgistutorials.com/en/docs/3/calculating_line_lengths.html and I should do more research as to when a question was asked... this was 4 years ago, just recently active.
    – TJR
    Commented Sep 28, 2020 at 20:12

3 Answers 3


The reason why you do not see the length in the attribute table is that the length (and area) of features are implicit attributes of their geometries. They are not stored by default, they need to be calculated.

If by cumulative distance you mean the total length of the line, you can get that value by creating a new field in the Field Calculator using $length as expression. QGIS will then calculate the length from the geometry and store it as attribute value.

For anything else you would need to first split up each line into its segments. For that use the "Explode Lines" function from the Processing Toolbox. You will get a new feature for each line segment. Then you can calculate the length per segment as shown above.

  • Thanks, could you explain more " you can get that value by creating a new field in the Field Calculator using $length as expression. " - I'm not sure what the Field Calculator is, I haven't used it before? Total length of the line is indeed what I'm after.
    – Georgia
    Commented Aug 18, 2016 at 11:54
  • Not sure why they posted that part of the answer as separate answer but @Knightshound has screenshots in their post. Commented Aug 19, 2016 at 10:09

Field Calculator is the abacus icon. Select the layer you want and open the field calculator.

enter image description here

Insert details for new field and write the expression $length and click 'ok'. A new column has been created for that layer with the calculated length of each feature

enter image description here


To complete former answers on the "cumulative distance" part, I've seen a solution which is to calculate the distance of each leg in one column and then add another column with the subtotals.

The answer comes from this thread: Add cumulative sum column to attribute table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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