Skip to main content
Became Hot Network Question
added 10 characters in body
Source Link
Matt
  • 17.9k
  • 4
  • 23
  • 59

I have dropped a GPS breadcrumb track (.gpx format) onto my project. If I generate a a virtual field in this layer to calculate the distance between successive crumbs using the expression:

distance(($geometry),geometry(get_feature_by_id( @layer_name, $id+1)))

distance(($geometry),geometry(get_feature_by_id( @layer_name, $id+1)))

I get totally misleading results. Why is this? And is there anyway around it without saving the GPX file as a projected shapefile and redoing the calculation (which then works fine)?

Many thanks

I have dropped a GPS breadcrumb track (.gpx format) onto my project. If I generate a a virtual field in this layer to calculate the distance between successive crumbs using the expression:

distance(($geometry),geometry(get_feature_by_id( @layer_name, $id+1)))

I get totally misleading results. Why is this? And is there anyway around it without saving the GPX file as a projected shapefile and redoing the calculation (which then works fine)?

Many thanks

I have dropped a GPS breadcrumb track (.gpx format) onto my project. If I generate a a virtual field in this layer to calculate the distance between successive crumbs using the expression:

distance(($geometry),geometry(get_feature_by_id( @layer_name, $id+1)))

I get totally misleading results. Why is this? And is there anyway around it without saving the GPX file as a projected shapefile and redoing the calculation (which then works fine)?

Source Link
Albert
  • 489
  • 3
  • 12

Calculated distance field along GPX track

I have dropped a GPS breadcrumb track (.gpx format) onto my project. If I generate a a virtual field in this layer to calculate the distance between successive crumbs using the expression:

distance(($geometry),geometry(get_feature_by_id( @layer_name, $id+1)))

I get totally misleading results. Why is this? And is there anyway around it without saving the GPX file as a projected shapefile and redoing the calculation (which then works fine)?

Many thanks