[QGIS-Developer] Length measurement weirdness (again)

Nyall Dawson nyall.dawson at gmail.com
Thu May 3 16:18:17 PDT 2018

On 3 May 2018 at 23:26, Paolo Cavallini <cavallini at faunalia.it> wrote:
> Hi all,
> the measurements of a EPSG:4326 line appear correct in any SRS, both
> with the interactive info tool and writing on the table the value of
> $length, *if* the OTF reprojection is active (including 4326).
> If it is not, the result is grossly overestimated (298 m instead of 228,
> etc.).
> Am I missing something, or this is a serious bug?

It's not a bug as much as very confusing 2.x behavior. The obscure
link between a "rendering" setting (OTF projection) and ellipsoidal
calculations (area/distance) is extremely confusing for users. We
couldn't change this in 2.x because of the API freeze and how embedded
this logic was in many areas of QGIS code and API.

That's why in 3.0 the whole OTF logic was reworked, so that OTF is
always on for rendering and doesn't the choice of ellipsoidal
calculations or not is totally based on the project's ellipsoid

So unfortunately for 2.18 there's really no choice but to ensure that
OTF projection setting is enabled.


More information about the QGIS-Developer mailing list