I am using PHP to query my PostgreSQL-db with PostGIS to get data. One of the columns is of the type geography, which means the returned data from that column looks like a string of random letters and numbers which of course it isn't. Is it possible somehow to parse that string to an actual point, and read the latitude and longitude of that point?

I now i can do this with SQL but i'd like to do it in PHP now during development.

有帮助吗?

解决方案

There are several output options available. Probably what you want is ST_AsText to get WKT.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top