MYSQL 查询指定范围内的经纬度

select * from `location` where (
acos(
sin(([#latitude#]*3.1415)/180) * sin((latitude*3.1415)/180) + 
cos(([#latitude#]*3.1415)/180) * cos((latitude*3.1415)/180) * cos(([#longitude#]*3.1415)/180 - (longitude*3.1415)/180)
)*6370.996
)<=1;

 

posted @ 2018-08-24 11:38  半雨微凉  阅读(3984)  评论(0编辑  收藏  举报