[postgis-users] constructing new geometry from existing columns

John Cartwright John.C.Cartwright at noaa.gov
Wed Nov 21 09:23:32 PST 2007


Hello All,

I'm trying to populate a newly-added geometry column in a table using 
two existing columns: LON, LAT.  The only way I see to do it seems a 
little clumsy:

 update  grid_points set SHAPE = GeomFromText('POINT(' || lon ||' ' || 
lat || ')',4326);

Is there a better way than constructing a WKT string?

Thanks!

-- john




More information about the postgis-users mailing list