I'm using PostgreSQL 14.1 with PostGIS 3.1.
I've got a UTM 10x10 km grid malla
, set in EPSG 25830, that covers all Spanish territories:
I have run the following code (just to check that everything is OK)
select utmcode, cast(st_area(m.geom)/10000 as integer) ha
from malla m;
but it returns values over 10,000 ha, meaning that the calculation is not accurate. I guess it's a matter of the projection, since the westernmost grids have the largest deviances, but I'm not sure as how to proceed. How could I overcome the problem?