查询某一坐标附近1公里内的信息
select * from parking
where pa_examine=1 and pa_yes=1 and sqrt(
(
((#pa_longitude#-pa_longitude) * PI () * 12656 * cos
(((#pa_latitude# + pa_latitude)/2) * PI
()/180)/180)
*
((#pa_longitude#-pa_longitude) * PI () * 12656 * cos (((#pa_latitude#
+ pa_latitude)/2) * PI
()/180)/180)
)
+
(
((#pa_latitude# -pa_latitude)* PI
()* 12656/180)
*
((#pa_latitude# -pa_latitude)* PI ()* 12656/180)
)
)<=1
查询距离某一左边最近的20个信息
order by ACOS(SIN((#ho_longitude# * 3.1415) / 180 )
*SIN((ho_latitude * 3.1415) / 180 ) +COS((#ho_longitude# * 3.1415) / 180
) * COS((ho_latitude * 3.1415) / 180 ) *COS((#ho_latitude# * 3.1415) /
180 - (ho_longitude * 3.1415) / 180 ) ) * 6380 asc limit 20