If you have a column called area and the geometry is in a column called
the_geom, then

UPDATE mytable SET area = area(the_geom)

will set the area in square map units.  A trigger function can also be
created so the area will automatically be computed whenever a record is
added or changed.

Bruce

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Marcus
C. England
Sent: Friday, April 04, 2008 6:01 PM
To: [email protected]
Subject: [postgis-users] Adding an area column to a table

Hi again,

As a follow-up to the last question, I would like to know - and please 
assume here my utmost stupidity as I have only recently come from the 
GUI world of ArcGIS - how do you add a column to a PostGIS layer that 
automatically calculates the area of each polygon feature in the layer?

Thanks in advance,

Marcus

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to