I'm doing some reverse Geo coding to convert latitude and longitude to a location name:
def reverseGeocode(coordinates):
result = rg.search(coordinates)
print(result)
if __name__ == "__main__":
coord = (-33.936952777777776, 18.39005)
reverseGeocode(coord)
Result has following format:
[OrderedDict([('lat', '-33.92584'), ('lon', '18.42322'), ('name', 'Cape Town'), ('admin1', 'Western Cape'), ('admin2', 'City of Cape Town'), ('cc', 'ZA')])]
How can i get to certain element of this OrderedDict
to have just a location 'name'? That would be 'Cape Town' in this example.