diff --git a/common/geocode/__init__.py b/common/geocode/__init__.py deleted file mode 100644 index 8b13789179..0000000000 --- a/common/geocode/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/common/geocode/reverse.py b/common/geocode/reverse.py deleted file mode 100644 index 834df33b1b..0000000000 --- a/common/geocode/reverse.py +++ /dev/null @@ -1,24 +0,0 @@ -import numpy as np -import os -import csv -path = os.path.dirname(os.path.abspath(__file__)) -# locally cache cities from -# https://github.com/thampiman/reverse-geocoder -csv_file_name = path + '/rg_cities1000.csv' - -# right hand drive is when the steering wheel is on the right of the car -# left hand traffic is when cars driver on the left side of the road -LHT_COUNTRIES = ['AU', 'IN', 'IE', 'JP', 'MU', 'MY', 'NZ', 'UK', 'ZA'] - - -def get_city(lat, lon): - cities = np.array(list(csv.reader(open(csv_file_name))))[1:] - positions = cities[:,:2].astype(np.float32) - idx = np.argmin(np.linalg.norm((positions - np.array([lat, lon])), axis=1)) - return cities[idx] - - -def is_lht(lat, lon): - city = get_city(lat, lon) - country = city[-1] - return country in LHT_COUNTRIES diff --git a/common/geocode/rg_cities1000.csv b/common/geocode/rg_cities1000.csv deleted file mode 100644 index f1781f0e08..0000000000 --- a/common/geocode/rg_cities1000.csv +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1de56dc32b0308c6094d5d833441c8ca25827f24e9a6a4cc144223ab5f9b65bf -size 7851524