[postgis-users] AddGeometryColumn error

Nicolas Ribot nicky666 at gmail.com
Wed Aug 27 02:08:07 PDT 2008


> Hi everyone!
>
> I have installed PostgreSQL 8.3 and PostGIS (postgis_1_3_3_pg83). I have a
> table with many stations in Southern Spain (POINT) and their coordinates
> LATITUDE, LONGITUDE and ELEVATION.
>
> How can I create a geometry column? I try with AddGeometryColumn but I couldn't.
>

Hi,

What is the error message ?
How did you create the table ?

AddgeometryColumn will add an extra column to your table (and register
it into the metadata) but will not populate it.
You will need to update your table, building the Points from the LAT,
LON, ELEVATION columns (something like -:
update <table> set the_geom = set_srid(st_makePoint(longitude,
latitude, elevation), <srid>);

Nicolas



More information about the postgis-users mailing list