mysql 取两点之间的距离,单位为: 米
st_distance_sphere(point(a.jd, a.wd), point(b.jd, b.dw))
示例:
set @p1=point(118.659802, 24.885497);
set @p2=point(118.671475, 24.867432);
select st_distance_sphere(@p1,@p2)
结果:
2328.436587875269
微信扫一扫
mysql 取两点之间的距离,单位为: 米
st_distance_sphere(point(a.jd, a.wd), point(b.jd, b.dw))
示例:
set @p1=point(118.659802, 24.885497);
set @p2=point(118.671475, 24.867432);
select st_distance_sphere(@p1,@p2)
结果:
2328.436587875269
相关推荐