[GIS] How to measure correct distances in a project with OpenLayers background

distanceqgisqgis-openlayers-plugin

I have 3 lat/long points as follows:

A = {35.257246,139.721256}
B = {35.256541,139.721491}
C = {35.256326,139.7203271}

1) Measurement result by Movable Type Scripts:

By using the distance calculation method at Movable Type Scripts, the distance results are:

distance(A,B)= 80.88745771063131(m)
distance(B,C)= 101.58773310547808(m)

I believe these results are correct.


2) Measurement result by QGIS measure line tool:

The QGIS desktop 2.0.1 and the Projection CRS is set to [+proj=longlat +datum=WGS84 +no_defs]. I use the Plugins/OpenLayers plugin/Add Google Satelite and import 3 lat/long points into QGIS.

The results are:

distance(A,B) = 100.374(m)
distance(B,C) = 135.114(m)

I need to generate a map from a large set of lat/long points as above and Google Satellite background on QGIS.

Could you show me how to solve this problem?

Best Answer

The first source you mention remarks:

All these formulæ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects)

so you should not rely on the results.

If you use the openlayers plugin, project CRS should be set to EPSG:3857. As Erica points out, that is not suitable for measurements.

For measuring, delete the openlayers background, and set the project CRS to the UTM zone of your part of the world instead, or what is used by your local surveying authority.

If you need the openlayers background for measuring, take a screenshot with "Save as image", add that to the canvas with layer CRS EPSG:3857, then delete the openlayers background and change CRS.