python經過經緯度計算兩點之間距離

from math import sin, asin, cos, radians, fabs, sqrt EARTH_RADIUS = 6371 # 地球平均半徑,6371km def hav(theta): s = sin(theta / 2) return s * s def get_distance_hav(lat0, lng0, lat1, lng1):
相關文章
相關標籤/搜索