[postgis-users] Polygon area in meters

Picavet Vincent Vincent.Picavet at mediapost.fr
Tue Feb 9 05:53:47 PST 2010


Hi,

> part de Kemal Bayram
> Envoyé : mardi 9 février 2010 14:40
> I'm current working with data in long/lat (wgs84) format and 
> using st_distance_spheroid to calculate the length of my 
> linestrings in meters.  I now need to calculate the area of 
> my polygons and am wondering what the easiest way of doing 
> this would be? 

You should really consider upgrade to the new PostGIS 1.5 and use the geography datatype, which supports st_area natively. Some other functions are supported as well using the very behaviour you propose.
Please see :
http://postgis.refractions.net/documentation/manual-1.5/ch04.html#PostGIS_Geography
and :
http://postgis.refractions.net/documentation/manual-1.5/ch08.html#PostGIS_TypeFunctionMatrix

> I am thinking projecting the polygon with an equal area 
> projection and then using st_area on the result.  Anyone have 
> any ideas on suitable projections/SRIDS?

There is a _ST_BestSRID(Geography) but I think it is more for intern use by other functions «magically» operating on geography type.

Good luck,
Vincent




More information about the postgis-users mailing list