OpenStreetMap

Get state for coordinate via API of any service?

Posted by Chaos99 on 1 March 2011 in English (English)

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

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!

Hide this comment

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.

Hide this comment

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

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment