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

Mike Toews mwtoews at gmail.com
Mon Jul 14 14:42:59 PDT 2014

There are many geometry output functions [1], such as
ST_AsLatLonText() [2], e.g.:

44°7'15.636"N 89°32'8.880"W


[1] http://postgis.net/docs/reference.html#Geometry_Outputs
[2] http://postgis.net/docs/ST_AsLatLonText.html

On 15 July 2014 07:50,  <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

More information about the postgis-users mailing list