[postgis-users] AddGeometryColumn error

javier.estevez.ext at juntadeandalucia.es javier.estevez.ext at juntadeandalucia.es
Wed Aug 27 03:29:37 PDT 2008


First of all, Postgres display me the next error with this query:

My database is named postgres
My table is named estac_aemet
The name of the new column I want to create is the_geom
23030 is UTM-ED50 huso 30 (Proyection I want)

SELECT addgeometrycolumn('postgres','estac_aemet', 'the_geom', 23030,'POINT',2)


NOTICE:  Invalid schema name - using current_schema()
CONTEXTO:  sentencia SQL: «SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5
, $6 )»
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement
ERROR:  no existe la relación «public.estac_aemet»
CONTEXTO:  sentencia SQL: «ALTER TABLE public.estac_aemet ADD COLUMN the_geom
geometry »
PL/pgSQL function "addgeometrycolumn" line 90 at EXECUTE statement
sentencia SQL: «SELECT AddGeometryColumn('', $1 , $2 , $3 , $4 , $5 , $6 )»
PL/pgSQL function "addgeometrycolumn" line 4 at SQL statement

>> 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
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>





More information about the postgis-users mailing list