计算两个坐标之间距离的函数

来源:互联网 发布:体育产业发展数据 编辑:程序博客网 时间:2024/04/30 01:55
select address 地址,county  区,entertype 类型,round( sdo_geom.sdo_distance(sdo_geometry(2001,null,sdo_point_type(t_x,t_y,null),null,null),sdo_geometry(2001,null,sdo_point_type(t1_x,t1_y,null),null,null),--sdo_geom.sdo_distance函数0.001),5)*1000  相差距离from (<pre name="code" class="sql">select t.lnglat.sdo_point.x  t_x,t.lnglat.sdo_point.y t_y,       t1.bd_lng t1_x,t1.bd_lat t1_y,       t.address address,       t2.county county ,       t2.entertype entertype

from  T_GIS_LNGLATLOG_SHANGHAI tjoin t_address_formal t2 on t.address=t2.addressjoin  t_cordinate_baidu t1 on t2.address_no=t1.id)order by 相差距离 


0 0
原创粉丝点击