diff --git a/lookup.py b/lookup.py new file mode 100755 index 0000000..5dae718 --- /dev/null +++ b/lookup.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 + +from geopy import Nominatim + +geolocator = Nominatim(user_agent="my-mapper") + +# first test to retreive geo coordinates + +fn="ct-csv" +with open( fn, 'r' ) as fp: + for line in fp: + location = geolocator.geocode(line) + # ~ print (location.latitude, location.longitude) + if location is not None: # its a class + # ~ print (location) + print ( location.latitude, location.longitude) +fp.close()