Вопрос

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