Hi Jochen
The alternative to $area is to use area($geometry), which then applies
the area based upon the CRS of the layer and the specific geometry,
instead of the project. Perhaps this is what you are needing to apply.
---
Regards,
Nigel Berjak
Please consider the environment before printing this email.
On 2025-03-14 19:48, Andrea Giudiceandrea via QGIS-User wrote:
Il 14/03/2025 15:38, Jochen Albrecht ha scritto:
Thank you, Andrea. But let me reiterate that the layer is projected,
so the default should in either case be to apply the algorithm.
$area does not allow me to specify projection parameters. But by
playing with that option for the other tool, I found that the
erroneous value is based on ellipsoidal calculations - regardless of
whether a planimetric project CRS has been defined or not.
Can you think of a way to override this behavior for $area?
Hi Jochen,
not sure to understand your question.
Area and length measurements can be performed either on the Cartesian
plane of the CRS or on the ellipsoid.
If a valid ellipsoid is the for the project [1], then the "$area"
function calculates the area on such ellipsoid, regardless of whether
the layer's or the project's CRS is a geographic or projected one.
If the ellipsoid is set to "None/Planimetric", then the "$area"
function will return the value of the area measured on the layer's CRS
Cartesian plane (regardless of whether the layer's or the project's CRS
is a geographic or projected one).
Instead, the "area" function always calculates the value of the
planimetric area measured on the layer's CRS Cartesian plane
(regardless of whether the layer's or the project's CRS is a geographic
or projected one and regardless a valid ellipsoid is the for the
project).
Thus, if you want to calculate the planimetric area on the Cartesian
plane of the layer's CRS using an expression, then you can just use the
"area" function. For the same purpose, you can also use the "$area"
function, ensuring the project's ellipsoid is set to
"None/Planimetric".
Regards.
Andrea
[1]
https://docs.qgis.org/3.40/en/docs/user_manual/introduction/qgis_configuration.html#general-properties
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
QGIS-User mailing list
QGIS-User@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user