3

I am totally new to QGIS and I have a List of Trackpoints which I loaded in QGIS as a CSV (with the GEOCSV plugin to be able to edit the layer).So I have a Layer with ~1000 Points now.

I like to add a column "distance" in the table of attributes with the distance from the previous point. The Distance should be calculated using latitide and longitude.

2

QGIS 3.0

If you are working on a Points layer which is on UTM zone 54N (EPSG:32654), then try:

distance(transform(geometry(get_feature_by_id('Points', $id+1)),'EPSG:4326','EPSG:32654'), 
         transform(geometry(get_feature_by_id('Points',   $id)),'EPSG:4326','EPSG:32654'))

Please edit 'Points' (layer name) and 'EPSG:32654' (your working CRS) as required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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