【python】2点間の距離

pip install geopy

import geopy
import geopy.distance

p1 = geopy.Point(pt_old.lat, pt_old.lon)
p2 = geopy.Point(pt.lat, pt.lon)

distance = geopy.distance.distance(p1, p2).m
distance = geopy.distance.distance(p1, p2).km

Leave a Comment.