Skip to content

Calculate haversine distance between current location and a list of other locations and select nearest

License

Notifications You must be signed in to change notification settings

151henry151/distance-calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

distance-calc

Calculate haversine distance between current location and a list of other locations and select nearest

May not always choose the best location because it is not calculating driving distance, only haversine distance ("as the crow flies")

Requires:

re

gpxpy

googlemaps

credentials.py with api key

location_list which is a list of ATM locations

To Do:

Should sanitize raw input at beginning of script

Requests latitude and longitude for each ATM location each time script is run -- should be modified to store those values to reduce running time

Notes for modification to make script run more quickly: Something like this should work:

if disk cache exists: data = read disk cache if thing in data and age < ttl: return location location = ask google write location to disk cache return location

About

Calculate haversine distance between current location and a list of other locations and select nearest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages