3

I have a project with the CRS set to EPSG:31370. In this project there are a couple of layers, with a different CRS than the project CRS namely EPSG:4326 and EPSG:31370. Now I need to calculate the area of the polygons in those layers in square meters. However, I can't seem to find how I can calculate the area in square meters when using a shapefile with the EPSG:4326. I've already googled, read the corresponding data in the manual, youtubed and did a search on this StackExchange, and while I'm convinced my problem is an easy one to solve, I can't seem to find the solution.

What steps should I take to be able to calculate the area of shapefiles with CRS's that have degrees as their units?

I am quite new to GIS.

8

You can convert the layer projection during the Field calculator calculation using the expression

area(transform( $geometry , 'EPSG:4326', 'EPSG:31370'))

7

You can use the following expression with the fieldcalculator in your attribute table, so you do not need to care about anything (except for the used project CRS). No reprojection of your layers or looking up EPSG-Codes or something like that.

area(transform($geometry,layer_property(@layer_name,'crs'),@project_crs))

Explanation: layer_property(@layer_name,'crs') will evaluate the EPSG-Code of your layer and @project_crs the EPSG-Code of your project. transform() will reproject your geometry to the project crs, and area() finally calculate the area of this reprojected geometry.

Since your project CRS is in meters, your result will be in square-meters, see: https://epsg.io/31370

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.