Skip to main content
3 of 3
added 4 characters in body
Matt
  • 17.9k
  • 4
  • 23
  • 59

The small values are likely because the CRS of GPX files is WGS84 (measured in degrees, not meters). In which case you will need to transform the points to a projected coordinate system.

Something like:

distance(transform($geometry, 'EPSG:4326', 'EPSG:32735'), transform(geometry(get_feature_by_id( @layer_name, $id+1)), 'EPSG:4326', 'EPSG:32735'))

Although this may be slow, depending how many points you have.


The problem with the calculated distances not corresponding with what you see on the map is that the points might not be ordered 1 to 1 with $id and timestamp. It is hard to tell without seeing your data.

Matt
  • 17.9k
  • 4
  • 23
  • 59