[postgis-users] HELP adding spatial field to table

Richard Heimann [C] heimann at ait.nrl.navy.mil
Tue Dec 11 16:01:06 PST 2007


In this however aren't you manually entering the values? I want to load an
ASCII file. X,y in my case are field names. 

You might still be right as Im not thoroughly familiar with ST_MakePoint.
Can you elaborate? 

Rich


-----Original Message-----
From: Gregory Williamson [mailto:Gregory.Williamson at digitalglobe.com] 
Sent: Tuesday, December 11, 2007 6:51 PM
To: Richard.Heimann at nrl.navy.mil; PostGIS Users Discussion; PostGIS Users
Discussion
Subject: RE: [postgis-users] HELP adding spatial field to table

Richard:

> Next (and where the trouble lies) 
> 
> 	UPDATE crimetest
> 	SET geom = PointFromText('POINT(' || x || ' ' || y || ')', 4326)
> 

try:
ST_MakePoint(<x>, <y>, [<z>], [<m>])

    Creates a 2d,3dz or 4d point geometry.

Less messing around with making a test string ...

HTH,

Greg Williamson
Senior DBA
GlobeXplorer LLC, a DigitalGlobe company

Confidentiality Notice: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information and must be protected in accordance with those
provisions. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message.

(My corporate masters made me say this.)





More information about the postgis-users mailing list