[postgis-users] create a point fom lat/lon
Obe, Regina
robe.dnd at cityofboston.gov
Wed May 30 16:08:09 PDT 2007
You have the lon and lat as part of your string so it wan't read the values. Also POINT needs to be in upper case.
Try instead
update iter_rco_2005g
set
the_geom=geomfromtext('POINT(' || long || ' ' || lat || ')', 4326);
hope that helps,
Regina
________________________________
From: postgis-users-bounces at postgis.refractions.net on behalf of Nahum Castro
Sent: Wed 5/30/2007 6:50 PM
To: PostGIS Users Discussion
Subject: [postgis-users] create a point fom lat/lon
Hello all:
I have two columns lat and lon, from these columns I
want to create a point on the_geom column.
this is how i did
update iter_rco_2005g
set
the_geom=geomfromtext('point(lon lat)', 4326);
and
update iter_rco_2005g
set
the_geom=geomfromtext('point(lon, lat)', 4326);
lat an lon are in dd.
I get
ERROR: Invalid OGC WKT (does not start with P,L,M or
G)
here is a sample data
mun | loc | lat | lon
-----+------+------------------+------------------
020 | 0001 | 21.1197222222222 | 101.680555555556
020 | 0261 | 21.0405555555556 | 101.503888888889
020 | 0262 | 21.0241666666667 | 101.714444444444
020 | 0263 | 21.15 | 101.607777777778
020 | 0264 | 21.1944444444444 | 101.530555555556
020 | 0266 | 20.9416666666667 | 101.613888888889
020 | 0267 | 21.0494444444444 | 101.6875
020 | 0271 | 20.9941666666667 | 101.589722222222
Thanks.
--
Nahum Castro
Leon, Guanajuato, Mexico
http://www.leon-linux.com <http://www.leon-linux.com/>
e-mail: pedro1_72 [en] yahoo [punto] com
___________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx <http://net.yahoo.com.mx/>
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070530/892d6db1/attachment.html>
More information about the postgis-users
mailing list