# Calculating distance travelled along track in QGIS?

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 ? 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. 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
Sep 28, 2020 at 20:12

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. Aug 18, 2016 at 11:54
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