[postgis-users] Create a geom column from old data

Paul Ramsey pramsey at refractions.net
Tue Jul 22 15:29:03 PDT 2003


update thetable set the_geom = GeometryFromText('POINT(' || longitude || 
' ' || latitude || ')',-1);


Zamil Murji wrote:
> Hello list,
> 
> I have a database all ready to go. It had two columns already defined
> (latitude and longitude). I want to use those two columns to create
> geoms under the proper SRID. Please help. I have 50000+ rows so I
> don't want to create each geom one at a time.
> 
> A step by step guide would be great. I already have a geometry column
> defined in the table called the_geom.
> 

-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the postgis-users mailing list