[postgis-users] How to create a point geometry from two text fields?

Gis Mage gismage at gmail.com
Fri Mar 25 07:44:13 PDT 2011


I have a table with two text fields "lat" and "long" of character varying
I've created a field the_geom with type geometry.

How do I calculate the_geom field with an sql query?
The table is huge - about 1.5 million records, so I think the fastest way to
do this is to use pointfromtext function, but I can't figure out how to put
in the values of "lat" and "long" fields inside function arguments.

Can anyone help me out?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110325/b8c653b6/attachment.html>

More information about the postgis-users mailing list