I am new to GIS in general, and QGIS in particular. I am trying to find information about fTools' Distance Matrix function in QGIS, but am having trouble finding documentation…I managed to make a matrix, but I would like to know how the distance is computed, and in what units it is measured.

  • QGIS uses the units of your CRS for all calculations. Feb 4, 2015 at 17:56

1 Answer 1


As a general rule QGIS always uses the dataset's coordinate system's units (the coordinate system is also referred to as CRS). So if you are not sure what units your CRS is using, or even what CRS has been entered for the dataset, then open the dataset's properties and check out the General tab, which lets you set the CRS.The string you would see indicates the units. In this case, for example, the m stands for meters, and all your calculations would be returned in meters:

enter image description here

On the other hand you could also open the prj or qpj files (if available; the qpj would only be available if your dataset has been "saved as" from QGIS). Those would indicate the units as well.

The fact that QGIS does not let you choose the units when doing calculations is confusing to many who come from an ArcGIS background, where you can freely choose your output units. Yes, this can be annoying at first, but in the end it makes you more aware of what CRS you are using, which is a good thing!

As for how QGIS internally manages fTools, I am not sure, but you could look into the source code, it is open source after all! Of course, you would have to understand some (or a lot of) programming to understand the code. You could for example find all of the source code on the QGIS GitHub page.

  • Thanks for the explanation. My CRS uses meters. But my distance matrix shows much too small numbers, with maximum distances around 50m. Things would make sense if units were in 100km…could that be somehow?
    – Matthijs
    Feb 4, 2015 at 22:07
  • That is weird. I am not too familiar with the tool myself, so I cannot say why your values would be off. But are your sure your CRS has been saved for the dataset? Note that setting the on-the-fly CRS or simply changing it in QGIS is not sufficient. You have to explicitly do a save as of your vector after changing the CRS for it to become the CRS that is used in calculations. Feb 5, 2015 at 17:59

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.