2

I am trying to add a new column in the planet_osm_polygon table in order to have a new column with the areas of all the polygons in the database. These are the commands I have used:

psql -U postgres -d gis -c "alter table planet_osm_polygon add column area real"

psql -U postgres -d gis -c "update planet_osm_polygon set area=st_area(st_transform(geom, 2154))

How am I supposed to use ST_Transform() function?

3

The geometry column is called way by default, not geom

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.