oracle spatial组件中预定义了很多通用的坐标系统,可以直接利用spatial提供的函数计算2点间距离。
select sdo_geom.sdo_distance(mdsys.sdo_geometry(2001,8307,mdsys.sdo_point_type(111.12,33.34,0),null,null),mdsys.sdo_geometry(2001,8307,mdsys.sdo_point_type(111.12,33.33,0),null,null),0.005) from dual;
其中2001代表简单点类型,8307代表为WGS84坐标系, 0.005为oracle计算时候的误差精度,本案中为5毫米
没有评论:
发表评论