-------- Original Message -------- Subject: [Qgis-user] Calculate acres From: Marc Bordelon via QGIS-User To: "qgis-user@lists.osgeo.org" Date: Thu Feb 20 2025 04:23:51 GMT+0100
I[ve downloaded version 3.34.15 LTR and created a new shape file. Its still not calculating the acres. The feature has "NULL" in it.
How are you calculating the area? Are you using the field calculator? You access it either from the attribute table or from the tab "Fields" in the layer properties. You can also set an expression in the "Attributes Form" in the layer properties.
Talking about expression. Unless you fetch your vector data from a geospatial database, you need to calculate the area with an expression. There are 2 ways to do that:
function $area Returns the area of the current feature. The area calculated by this function respects both the current project's ellipsoid setting and area unit settings. For example, if an ellipsoid has been set for the project then the calculated area will be ellipsoidal, and if no ellipsoid is set then the calculated area will be planimetric. function area Returns the area of a geometry polygon object. Calculations are always planimetric in the Spatial Reference System (SRS) of this geometry, and the units of the returned area will match the units for the SRS. This differs from the calculations performed by the $area function, which will perform ellipsoidal calculations based on the project's ellipsoid and area unit settings. Syntax area(geometry) Arguments geometry polygon geometry object Examples area(geom_from_wkt('POLYGON((0 0, 4 0, 4 2, 0 2, 0 0))')) → 8.0
You also need to set your units of measurement in your project settings: Project > Properties: Tab "General", item "Measurements" > "Units for area measurement"
I'm at my wit's end on this. I tried creating a dummy shape file and it give me the same results when calculating the acres.
Also, don't use shape files, use geopackage. Instead of saving hundreds of shapefiles in one or several folders, you save one geopackage with several layers/tables. Think of it like the personal geodatabase from ArcGIS. After you're done with your work, you can always export your layers as SHP. Geopackage is so much better than shape.
-- Tobias A Schula Forestry Expert
OpenPGP_0x3B6BA2B3E91776FA.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ 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