转自:https://zhuanlan.zhihu.com/p/612305027
描述
百度坐标系转wgs84坐标系"geoc_bd09towgs84"("geom" "public"."geometry")
示例
select geoc_bd09towgs84(st_geometryfromtext('POINT (120.23382400080985 30.38137624233871)')); --return POINT (120.22286989552329 30.377518532797247) select geoc_bd09towgs84(geometry),geometry from gantry g
- geoc_wgs84tobd09 wgs84坐标转百度。
描述
wgs84转百度坐标系"geoc_wgs84tobd09"("geom" "public"."geometry")
示例
select geoc_wgs84tobd09(st_geometryfromtext('POINT (120.22286189815185 30.37751343583605)'));--return POINT (120.23382400080985 30.38137624233871) select geoc_wgs84tobd09(geometry),geometry from gantry g
获取点的X、Y、Z坐标 ST_X(geometry)、 ST_Y(geometry)、 ST_Z(geometry)
示例
SELECT ST_X(ST_GeomFromEWKT('POINT(1 2 3 4)'));--return 1 SELECT ST_Y(ST_GeomFromEWKT('POINT(1 2 3 4)'));--return 2 SELECT ST_Z(ST_GeomFromEWKT('POINT(1 2 3 4)'));--return 3
标签:wgs84,POINT,geometry,bd09towgs84,ST,return,geoc From: https://www.cnblogs.com/gzy2016Blog/p/17932478.html