du229908 2012-09-18 17:46
浏览 32
已采纳

PHP将数据类型地理的结果转换为坐标

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.

  • 写回答

1条回答 默认 最新

  • duanmei1850 2012-09-19 20:23
    关注

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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

    报告相同问题?

    悬赏问题

    • ¥20 win10商店接入问题
    • ¥15 java 这种树形框吗
    • ¥40 找同学帮敲Python代码
    • ¥15 MYSQL 订单的商品明细重复计算问题
    • ¥15 微信实时共享位置修改
    • ¥100 TG的session协议号转成直登号号后客户端登录几分钟后自动退出设备
    • ¥50 共模反馈回路的小信号增益
    • ¥15 arduino ssd1306函数与tone函数放歌代码不兼容问题
    • ¥70 0.96版本hbase的row_key里含有双引号,无法deleteall
    • ¥15 诊断性META分析合并效能的检验