Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top