[postgis-users] create a point fom lat/lon

Nahum Castro pedro1_72 at yahoo.com
Wed May 30 15:50:44 PDT 2007


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
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 




More information about the postgis-users mailing list