ST_X function on POSTGIS geography() fields

196 views
Skip to first unread message

libe...@gmail.com

unread,
Apr 23, 2014, 6:44:39 AM4/23/14
to web...@googlegroups.com
Hi everyone,
I am trying to extract latitude and longitude from a POSTGIS geography() field. Unfortunately the usual st_x() and st_y() functions normally used
for geometry() fields won't work.
How can I extract the required values or transform geography in geometry?

Thanks

Ruud Schroen

unread,
Jun 20, 2015, 4:36:55 AM6/20/15
to web...@googlegroups.com
I'd like to know this as well. Does anyone have some tips?

Massimo Di Pierro

unread,
Jun 22, 2015, 2:51:59 AM6/22/15
to web...@googlegroups.com, libe...@gmail.com
Please open a pydal ticket. I do not think we support this yet but we can add it.

wish...@gmail.com

unread,
Sep 29, 2015, 5:17:37 PM9/29/15
to web2py-users, libe...@gmail.com
+1 from my side too :-) Was a pydal ticket ever opened?
Otherwise I would do now...

Cheers
Toby

wish...@gmail.com

unread,
Sep 30, 2015, 4:56:56 PM9/30/15
to web2py-users, libe...@gmail.com
Message has been deleted

DenesL

unread,
Oct 4, 2015, 1:34:00 PM10/4/15
to web2py-users, libe...@gmail.com
How do you propose to code those functions if they are not available in the DB engine?.
MS SQL Server does have functions to extract longitude and latitude data from geography points but PostGIS does not seem to have them.

I can send in a patch for MSSQL with the following extended methods: Lat Long M Z
(last two being measure and elevation info)
and more functions are available depending on the version of MSSQL.

Denes
Reply all
Reply to author
Forward
0 new messages