Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top