Hi,
does anybody know a way of retrieving the state for a given coordinate via some kind of API?
Like getting 'Bavaria'(Germany) or 'Wales'(GB) or 'Lublin'(Poland).
There seem to be such services, as some geotagging tools for pictures use them. But I don't know which services or APIs they use and if it's OSM based.
Any help (even if it is just on nomenclature; is this a reverse-geo-db?) is much appreciated.
Thanks
Chaos
Discussion
Comment from lezurdis on 1 March 2011 at 12:24
I've seen this, it looks like what you need :
http://ojw.dev.openstreetmap.org/WhatCountry/?lat=51.8478&lon=9.0282&lang=de
Comment from Chaos99 on 1 March 2011 at 12:28
Thank you very much.
I've so far concluded that 'Reverse Geocoding' is what I need and that GeoNames supports it, but not based on OSM data.
Yours looks very good. Just what I needed. I just have to look at for what countries it is usable.
Thanks again very much!
Comment from chriscf on 1 March 2011 at 15:03
There's also Nominatim, which powers the search on the slippy map. It has some oddities, like thinking that the Palace of Westminster is in Hertfordshire, or that Tonyrefail is a suburb of Swansea in the Vale of Glamorgan (a two-step fail on that one), but depending on the quality of boundary data it should be able to get a rough fix on most locations. Just be careful with politically-sensitive locations - we don't want to be putting Nicaraguan troops in Costa Rica again.
Comment from Milliams on 1 March 2011 at 17:44
MapQuest provide a reverse geocoding service based on OSM data. See http://open.mapquestapi.com/nominatim/#reverse