I am playing a bit around with Qgis 2.14.6 to understand how it deals with distance measurement.
I took a line-shapefile that I saved in 3 different coordinate systems (4326, 32642 and a national one that doesn't exist in Qgis yet).
Using 32642 and the national one, the length is quite similar (6442m vs. 6428m)
But using 4326 (unprojected WGS84), I get 8057m
In all cases, I just used the Field Calculator and introduced $length
.
I was already positively surprised that the result using 4326 was in meters and not in degrees.
To calculate the distance on the dataset in 4326, I assume that Qgis does some kind of re-projection in the background. Does anyone know which one?
Shapefiles here if anyone wants to play around: http://bit.ly/2cwe4w9
EDIT - adding more info after more tests
As you can see, now both my shapefile and the project are in EPSG:4326, so unprojected:
Here the rough measurement of my shapefile, with the Qgis measure tool:
When I use the field calculator, the preview gives me a value in degrees, while the result seems to be in meters:
This would mean that the function $length
, like the measurement tool, always gives a result in meters, but using a very coarse approximation of the degrees => meters transformation:
Is this a bug? or should it really behave like this? I find it at best counter-intuitive (but maybe it's just me) and, at worse, completely misleading (it makes very little sense to use, everywhere on earth, the length of 1 degree at the Equator). Any input or opinion here? Should I open a bug report (at least for the inconsistency between the preview and the actual result)?