I start a new project with base on OpenLayers plugin but if I check the distance on QGIS with distance tool (I choose a straight road) I view 5.466m on QGIS and 4.300m on google (by walking).

How is it possible?

On QGIS 2.6.1 I do not set any CRS


2 Answers 2


I am no expert in this but from my understanding:

  • The OpenLayers plugin in QGIS uses the EPSG:3857 CRS which is a projected CRS on a flat surface (here's a very good post describing it). Therefore, it calculates a straight-line distance as you would on a paper map.
  • I can't find how Google Maps calculates its distances but a common method would be to use the Haversine formula or "as the crow flies". This calculates distances from two points on a sphere. There is a forum here suggesting what Google Maps uses to calculate distances.

So in terms of calculating distances, Google Maps provides a more accurate measurement assuming your CRS is set to EPSG:3857 in QGIS. You should always use the CRS of the local country to give you the best distance measurement.

Hope this helps and if anyone spots a mistake, please correct me :)

  • 2
    In my situation the difference is over 20%, I think there is an error in the project but I am not able to find it
    – Ale
    Commented Jul 15, 2015 at 8:56
  • 1
    You should never do measurements that you hope to do accurately in any sort of projected coordinate system. It is best to use a geographic coordinate system (such as 4326) and use the Haversine formula to do any sort of mapping. If you are concerned with having a higher accuracy over smaller distances than use a local projection system that preserves distances.
    – onakua
    Commented Dec 11, 2017 at 16:43

Joseph's answer assuming it has something to do with straight-line distance is not correct.

Although the question is different, the answer is the same as this and this.

The QGIS ruler calculates the distance in the viewers projection which I assume is Web Mercator (EPSG:3857) in your case.

WGS 84 / Pseudo-Mercator (EPSG:3857) projection is heavily distorted when moving away from the equator. Thus, it could be discussed if the units should be called "Pseudo-meters". One meter in reality is approximately 1/cos(lat) pseudo-meters.

4300 m / cos(38.1°) = 5466 pseudo-meters

enter image description here

CC BY-SA 3.0, Author: Stefan Kühn

  • Just found this old question when working on a similar question and thought I should answer it too for other people having the same problem.
    – pLumo
    Commented Dec 11, 2017 at 15:41

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.