Guest User

Untitled

a guest
Oct 18th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. from geopy.geocoders import Nominatim
  2.  
  3. geolocator = Nominatim(timeout=3)
  4. geolocator.reverse('52.5094982,13.3765983')
  5. loc = location.raw
  6. loc_dict = location.raw
  7. print(loc_dict['address'])
  8. and this is the output:
  9.  
  10. {'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