我:
select 6378.137*acos(sin(38/57.2958) * sin(39/57.2958) + cos(38/57.2958) * cos(39/57.2958) * cos(89/57.2958 - 72/57.2958))
from beatles_ods.order_info
where concat(year,month,day) = '20151001'
limit 1;
我:
上面是通过hql计算经纬度距离
我:
计算结果是km
我:
select 6378.137*acos(sin(lat1/57.2958) * sin(lat2/57.2958) + cos(lat1/57.2958) * cos(lat2/57.2958) * cos(lon1/57.2958 - lon2/57.2958))
from beatles_ods.order_info
where concat(year,month,day) = '20151001'
limit 1;
我:
这个是公式
我:
这个是网页的测量经纬度工具
我:
http://www.storyday.com/wp-content/uploads/2008/09/latlung_dis.html