[postgis-users] Changing Column output from WKB to Lat Lon Coordinates

James David Smith james.david.smith at gmail.com
Mon Jul 14 14:17:52 PDT 2014


Google the function st_astext . Should do what you want. Alternatively you
can use st_x and st_y.

Cheers

//JDS
On 14 Jul 2014 22:02, <evan at pwwinc.net> wrote:

> Hello,
>
> I am attempting to store some gps coordinates that i collected for a
> geospatial db in precision ag.  I created a table with a geometry column
> called "Coordinates"  using the command "Coordinates"
> geometry(Point,4326).  I then populated the column using the
> command ST_SetSRID(ST_MakePoint(-89.53580,44.12101), 4326));
> This populates the coordinate table with a string in WKB.  Is there a way
> I can covert the output values of the entire column from WKB to the raw
> lat,lon values.  I have tried the alter table command    ALTER TABLE
> "Customers"ALTER COLUMN "Coordinates" TYPE geometry(St_AsLatLonText),
> 4326));  but with no luck.
>
> Im relatively new to sql and postgres,  I would certainly appreciate any
> help.
>
> Thanks!
> Evan
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140714/1324ec69/attachment.html>


More information about the postgis-users mailing list