문제

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