Find the distance between two points (is it a straight line distance?) It seems that it is required with accuracy within 1 mm
Get the coordinates of the two points you want to find. Here, we will find the distance between Tokyo Station and Osaka Station. If you search for "Tokyo Station" and "Osaka Station" on google map, you will find each URL. 35.6813023,139.7640582 34.7024898,135.4937619 Is written after @, so copy it. Probably latitude and longitude.
vincenty.py
# -*- coding: utf-8 -*-
from vincenty import vincenty
tokyo_sta = (35.6813023, 139.7640582)
osaka_sta = (34.7024898, 135.4937619)
#The unit of distance is meters
print vincenty(tokyo_sta, osaka_sta)
#Specify miles as the unit of distance
print vincenty(tokyo_sta, osaka_sta, miles=True)
403.751385 250.879402
What can it be used for? ('_')
Recommended Posts