[GIS] Calculating distance travelled along track in QGIS

distancegarminqgisroutingtracking

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?

Best Answer

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.

Related Question