Put in the correct schema name below if it isn't public; and you may need
to quote your lat/lon field names if they're really capitalized ( i.e.
"Latitude", "Longitude"). This should work...
'the_geom', --field to contain geom
4326, --srid from spatial_ref_sys
'POINT', --type of geometry
2 --dimensions, 1 didn't work.
SET the_geom = ST_SetSRID(ST_Point(longitude, latitude),4326);
James Smith <james(dot)david(dot)smith(at)gmail(dot)com>
05/29/2011 04:31 PM
[NOVICE] Create GEOM Column
Would appreciate some help. I have created an existing database (with
PostGIS extension) andhas a table called CAMDENGPS which is populated
with approx 600,000 rows. There are 20 or so columns in the table, two
of which are Latitude and Longitude (WGS84). I would now like to
create a Geom column with points in, the values of which should be
taken from the other columns. Could someone provide me with sample
code as to how to do this please?
In response to
pgsql-novice by date
|Next:||From: Jean-Yves F. Barbier||Date: 2011-05-31 17:09:23|
|Subject: BYTEA or LO?|
|Previous:||From: Jean-Yves F. Barbier||Date: 2011-05-31 14:30:47|
|Subject: Re: indexes multicolumn|