[Qgis-developer] Area calculation issues

Nyall Dawson nyall.dawson at gmail.com
Thu Feb 2 16:36:28 PST 2017


On 1 February 2017 at 19:55, Neumann, Andreas <a.neumann at carto.net> wrote:
>
> Hi Nyall,
>
> Thanks for the explanations. I should have read the explanations of the help text more closely. It explains it all.
>
> However, there still seem to be issues. Consider the following results below. First column is the result of $area, second column is area($geometry).
>
> Sometimes the results are very close, in other cases the difference is massive. Like in the very first row. 32'087 vs 190'605'589 square meters. This can't be explained with ellipsoidical vs. planimetric. In this first row, the result of area($geometry) (planimetric) seems correct, while the ellipsoidical result ($area) is massively wrong.
>
> How can this huge difference be explained?

Ok - I've looked into this. It's not an issue in 2.14 or 3.0, just 2.18.

It was most likely fixed by:
https://github.com/qgis/QGIS/commit/abc0919 "Fix area calculation of
compoundcurve rings if they contain a 2-vertex linestring"

Committed to 2.14 (with unit tests), I forward ported to 3.0, but it
hasn't been applied to 2.18. I'll do this.

Nyall


More information about the Qgis-developer mailing list