SELECT
s.map_lat,
s.map_lng,
2 * 6378.137 * ASIN(
SQRT(
POW(
SIN(
PI() * (22.549438 - s.map_lat) / 360
),
2
) + COS(PI() * 113.95717 / 180) * COS(s.map_lat * PI() / 180) * POW(
SIN(
PI() * (113.95717 - s.map_lng) / 360
),
2
)
)
)
AS distance
FROM
poobo_store s
where s.map_lat is NOT null and s.map_lng is NOT null
ORDER BY distance
mysq计算两个gps坐标的距离
最新推荐文章于 2022-06-30 15:05:49 发布