1

I am trying to calculate the difference between the positions of the same point on two different layers. One layer is a shapefile, other layer is a text file, and each point has a unique identifier, Stationval. Found something similar, using a virtual layer, however my python skills are not good enough to convert this. Was also looking for the Points2One plugin, with no avail.

enter image description here

1

you can use the field calculator with a expression like that:

distance(geometry(get_feature('LayerA','ID_ColumnA','ID_A')),geometry(get_feature('LayerB','ID_ColumnB','ID_B')))
  • Thank you eurojam, I shall try your suggestion to see what solution is the most suitable for me. – szilard Nov 30 '18 at 9:00
1

With all due respect, your question has me confused. If they are "...the same point..." wouldn't the distance thus be zero? I mean, they are the same point, after all.

But, in spite of my confusion, perhaps I can point you to two QGIS tools that may be of help:

  1. NNJOIN Plugin: Determines the distance From each feature to its nearest single feature
  2. Vector > Analysis Tools > Distance Matrix tool: This returns the distance from each feature to every other feature (pairwise comparison).
  • Thank you Stu Smith, nnjoin did the trick. Sorry for not being clear enough: one layer has the points as planned, other layer points on field. – szilard Nov 30 '18 at 8:58
  • Great, happy to help! – Stu Smith Nov 30 '18 at 18:59

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.