[GIS] QGIS: calculate distance between points

distancedistance matrixqgis

I'm using QGIS 2.8.

I need to calculate the distance between points depending on points ID (not nearest point). I have a CSV table including points ID and coordinates. Each point is referenced on 2 different lines with a different pair of coordinates. I need to know the distance between the 2 positions of each point.

enter image description here

I have tried fTools plugin but the Distance matrix function returns nearest points measures (I had beforehand splitted the CSV table in 2 sets of unique points ID).

Any idea about a plugin or function that would enable to do this?

Best Answer

Have you tried the Points2One plugin mentioned in this post.

You should be able to create lines, grouped by the point IDs. Once you have the line layer you could calculate a line length to get the distance between the two points.

FYI - using the plugin on Mac created the line layer but wouldn't add it to my project, I thought it did't work but it does. You just have to load your line layer back into the project.

Related Question