<HTML dir=ltr><HEAD><TITLE>[postgis-users] create a point fom lat/lon</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText38628 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>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.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Try instead</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><SPAN class=content><PRE><CODE><FONT size=2>update iter_rco_2005g<BR>set<BR>the_geom=geomfromtext(<FONT size=3>'POINT(' || long || ' ' || lat || ')'</FONT>, 4326);</FONT><BR></CODE></PRE><PRE><CODE>hope that helps,</CODE></PRE><PRE><CODE>Regina</PRE></CODE></SPAN></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> postgis-users-bounces@postgis.refractions.net on behalf of Nahum Castro<BR><B>Sent:</B> Wed 5/30/2007 6:50 PM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> [postgis-users] create a point fom lat/lon<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hello all:<BR><BR>I have two columns lat and lon, from these columns I<BR>want to create a point on the_geom column.<BR><BR>this is how i did<BR><BR>update iter_rco_2005g<BR>set<BR>the_geom=geomfromtext('point(lon lat)', 4326);<BR><BR>and<BR><BR>update iter_rco_2005g<BR>set<BR>the_geom=geomfromtext('point(lon, lat)', 4326);<BR><BR>lat an lon are in dd.<BR><BR>I get<BR>ERROR:  Invalid OGC WKT (does not start with P,L,M or<BR>G)<BR><BR>here is a sample data<BR> mun | loc  |       lat        |       lon<BR>-----+------+------------------+------------------<BR> 020 | 0001 | 21.1197222222222 | 101.680555555556<BR> 020 | 0261 | 21.0405555555556 | 101.503888888889<BR> 020 | 0262 | 21.0241666666667 | 101.714444444444<BR> 020 | 0263 |            21.15 | 101.607777777778<BR> 020 | 0264 | 21.1944444444444 | 101.530555555556<BR> 020 | 0266 | 20.9416666666667 | 101.613888888889<BR> 020 | 0267 | 21.0494444444444 |         101.6875<BR> 020 | 0271 | 20.9941666666667 | 101.589722222222<BR><BR>Thanks.<BR><BR><BR><BR><BR>--<BR>Nahum Castro<BR>Leon, Guanajuato, Mexico<BR><A href="http://www.leon-linux.com/">http://www.leon-linux.com</A><BR>e-mail: pedro1_72 [en] yahoo [punto] com<BR><BR><BR>       <BR>       <BR>               <BR>___________________________________________________________<BR>Do You Yahoo!?<BR>La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. <A href="http://net.yahoo.com.mx/">http://net.yahoo.com.mx</A><BR><BR>_______________________________________________<BR>postgis-users mailing list<BR>postgis-users@postgis.refractions.net<BR><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
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.
</STRONG></P></BODY></HTML>