get city / state returned from geocode()

63 views
Skip to first unread message

Joe James

unread,
Apr 2, 2011, 7:46:16 PM4/2/11
to geopy
I'm using geopy with the google api to do something like this:

g = geocoders.Google(GOOGLE_MAPS_KEY)
place, (lat, lng) = g.geocode(address)

but .... places is not normalized and could be different every time
depending upon the original address entered. How do I go about
getting back just the city and state from: g.geocode(address)?

I know Google returns a lot of data back with their maps api, so I am
sure it is being returned, but i'm just not sure how to get it with
geopy.

Thanks for your help
Reply all
Reply to author
Forward
0 new messages