[Qgis-user] Different values for $area and 'Add Geometry Attributes'

Andrea Giudiceandrea andreaerdna at libero.it
Thu Mar 13 11:47:34 PDT 2025


Hi Jochen,
as described in the user manual, the "Add geometry attributes" 
processing algorithm [1] "generates a new vector layer ... containing 
geometric measurements based on a selected CRS.", i.e. it measures 
Cartesian planimetric length and area on the CRS's cartographic plane.

The "$area" function [2] outputs the value of the area measured on the 
ellipsoid set for the project, instead.

You can obtain the same area value calculated by the "Add geometry 
attributes" processing algorithm using the "area" function [3].

Regards.

Andrea Giudiceandrea

[1] 
https://docs.qgis.org/3.40/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#add-geometry-attributes
[2] 
https://docs.qgis.org/3.40/en/docs/user_manual/expressions/functions_list.html#area
[3] 
https://docs.qgis.org/3.40/en/docs/user_manual/expressions/functions_list.html#id25

> Jochen Albrecht jochen.albrecht at gmail.com
> Thu Mar 13 13:34:41 PDT 2025

> When I use the Add Geometry Attributes function, the sum of the
> calculated areas is less than a square millimeter off. When I use instead
> the $area variable in the field calculator, the sum is some 670 square
> meters off.



More information about the QGIS-User mailing list