[OSM-talk] Reverse look-up gazetteer

Roland Olbricht roland.olbricht at gmx.de
Fri Mar 20 09:50:41 GMT 2009


> Does anyone know if there is there a web service that lets me take the
> latitude and longitude of a node and establish which country,
> state/county/province, city and Zip/post code the node is in?

The most canonical way is to use the boundary data inside OSM. This is usually 
stored in a relation tagged with the key "admin_level" and values from "2" 
(for countries) to "10" (for parts of hamlets, depending on the country) 
which countains all the ways that constitute the boundary.
The data is of quite good quality for a lot of cities in various European 
countries but it is poor for the most country boundaries themselves (there 
are gaps in the boundaries). But this should improve over the time.

I'm currently working as part of a larger project on this service. The reverse 
gazetteer itself based purely on OSM data works fine, but it is not online 
yet. Currently, I'm working on making minute updates possible. And the entire 
system should anyway be re-tested after the move to the 0.6 api which will 
take place at 20th april.

So I think I'll probably go online around mid-may. I you can't wait, I can put 
the source code on the web, but it is really a huge mess at the moment.

Cheers,
Roland




More information about the talk mailing list