[postgis-users] Postgis Area size problem

Nicolas Ribot nicky666 at gmail.com
Wed Mar 12 01:29:15 PDT 2008


On 11/03/2008, Paulius J <paulius at digitalwork.lt> wrote:
>
>  Hello,
>
>  I have such a problem. Here is my polygon and it looks that everthing is
>  allright:
>  POLYGON((56.05364 21.06079,56.43213 22.12646,56.27386 24.55444,56.41998
>  24.88403,56.17002 25.10376,55.6528 26.63086,54.965 26.25732,54.78168
>  25.75195,54.31652 25.62012,54.14957 25.74097,54.18173 25.53223,54.28447
>  25.47729,53.90434 24.37866,53.96255 23.47778,54.25881 23.20313,54.35496
>  22.77466,54.78802 22.82959,54.95239 22.65381,55.26034 21.32446,56.0475
>  21.0498,56.05364 21.06079))
>
>  But when i want to find the area of it using Area i get the result:
>  9.04832470074997
>  I do not know how to get the area size in square meters or something similar
>  to this? Maybe i should use some other function, but according the postgis
>  manual I use Area or ST_Area and have such problem...
>
>  P.S. i am using SRID = 4326 for the Geometry column.
>

ST_area computes the area in geometry's units. Here square degrees.
Repreject your data in a metric reference system (like UTM for
instance) with st_transform(), then compute the area.

Something like:

select st_area(st_transform(geometryFromText('POLYGON((56.05364
21.06079,56.43213 22.12646,56.27386 24.55444,56.41998
24.88403,56.17002 25.10376,55.6528 26.63086,54.965 26.25732,54.78168
25.75195,54.31652 25.62012,54.14957 25.74097,54.18173 25.53223,54.28447
25.47729,53.90434 24.37866,53.96255 23.47778,54.25881 23.20313,54.35496
22.77466,54.78802 22.82959,54.95239 22.65381,55.26034 21.32446,56.0475
21.0498,56.05364 21.06079))', 4326), 32640));

Nico



More information about the postgis-users mailing list