I use ST_area(geometry) in order to calculate the area of each grid cell of a vector grid with LCC projection and 6x6km2 resolution. The CRS of the vector is:
+proj=lcc +lat_1=45 +lat_2=22 +lat_0=38.7 +lon_0=20 +x_0=0 +y_0=0 +a=6370000 +b=6370000 +units=m +no_defs
I do the following:
ogrinfo -dialect SQLite -sql "SELECT id,ST_Area(geometry) as AREA FROM grid" grid.shp
ogrinfo grid.shp -sql "ALTER TABLE grid ADD COLUMN AREA_grid float"
ogrinfo grid.shp -dialect SQLite -sql "UPDATE grid SET AREA_grid =ST_Area(geometry)"
The result is that the area_grid takes the value of 36000000m2 for all grid cells. This is not correct since the real area of grid cell slightly varies in different coordinates.
Do I have to define in a different way the area of the grid cell?