I have two datasets of the same addresses, one geocoded with Google, the other with Nominatim.

Now I want to compare address1 of dataset1 with address1 of dataset2, then address2 of dataset2 with address2 of dataset2 and so on.

Using QGIS, I tried the distance matrix and the Distance to nearest hub-modules. The problem is, that they only give out the nearest point and not the appropriate point/address.

So far, I didn't try ArcGIS, but am not aware of an easy solution there anyway.

Is there a way to write a python script for my issue or a module I am not aware of?

  • Thank you for your help. I now created an ID column in both datasets, then created a distance matrix (with Processing > QGIS > Vector analysis tools > Distance matrix) and selected the needed columns in the attribute table with the expression "'InputID'='OutputID'". Then I extracted them with right click on the dataset and "Save as". That method worked fine.
    – GISbert
    May 21, 2016 at 6:27

2 Answers 2


In QGIS you can try the Distance Matrix of Saga (under Processing > Tools > Saga > Shapes - Points). This calculates a distance matrix for all points in one layer only, but does include an ID. Just combine the two layers into one (e.g. with Vector > Data Management Tools > Merge Shapefile to One). Make sure that you have some attribute that makes it possible to separate the two layers within the results.


Arcgis solution, but applicable to any decent GIS.

Project your layers. Calculate xy columns Join table to another by address. Calculate distance between 2 pairs of coordinates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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