时间:2021-07-01 10:21:17 帮助过:44人阅读
select *,(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(111.86141967773438-lat)/360),2)+COS(PI()*33.07078170776367/180)* COS(lat
select *,(2 * 6378.137* ASIN(SQRT(POW(SIN(PI()*(111.86141967773438-lat)/360),2)+COS(PI()*33.07078170776367/180)* COS(lat * PI()/180)*POW(SIN(PI()*(33.07078170776367-lng)/360),2)))) as juli from `area`
order by juli asc limit 0,20
差不多就是这样的,做个记录
但是我觉得这样还是很慢,因为我的坐标都是通过百度获取的,我的想法是能够转成平面坐标更好,这样更好计算
,