Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from geopy.geocoders import Nominatim
- geolocator = Nominatim(timeout=3)
- geolocator.reverse('52.5094982,13.3765983')
- loc = location.raw
- loc_dict = location.raw
- print(loc_dict['address'])
- and this is the output:
- {'suburb': 'Tiergarten', 'country_code': 'de', 'country': 'Deutschland', 'postcode': '10117', 'attraction': 'Potsdamer Platz', 'road': 'Potsdamer Platz', 'city': 'Berlin', 'city_district': 'Mitte', 'state': 'Berlin'}
Add Comment
Please, Sign In to add comment