[GIS] Reverse geocoding to get city, state, country data separately

pythonrreverse-geocoding

I have longitude and latitude data. I need to reverse geocode to get city, state, country data separately.

I have checked google service.

Google provides complete address to a micro level. Separation into city, state, country seems not possible.

Any suggestions?

Best Answer

Looks like the Google reverse geocoding API will break it down for you, take a look at this result:

http://maps.googleapis.com/maps/api/geocode/xml?latlng=40.714224,-73.961452&sensor=false

If you switch out xml with json, you can get json instead. Another option could be the Nominatim service, which also returns either xml or json.