postgis中实现GCJ02、WGS84、BD09坐标转换

复制geoc-pg-coordtansform.sql中代码,在数据库执行。

链接:https://pan.baidu.com/s/1Ps2n4uxSluUr-ADnojMQfA

提取码:bn9y

示例:

GCJ02转WGS84

select geoc_gcj02towgs84(geom) from test_table

WGS84转GCJ02

select geoc_wgs84togcj02(geom) from test_table

WGS84转BD09

select geoc_wgs84tobd09(geom) from test_table

BD09转WGS84

select geoc_bd09towgs84(geom) from test_table

GCJ02转BD09

select geoc_gcj02tobd09(geom) from test_table

BD09转GCJ02

select geoc_bd09togcj02(geom) from test_table

注意:传入的geometry参数的 SRID 必须为4326 或 4490 ,否则返回null。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容