[OSM-talk] is_in and similar tags
Roland Olbricht
roland.olbricht at gmx.de
Wed Jul 29 13:19:08 BST 2009
> > Could someone[1] setup a web-service where you send it a lat/lon and
> > it returns a list of all boundaries that point is within? So just one
> > website imports the boundary data instead of everyone having to know
> > how to do the 'is within' search[2].
>
> I think you might be able to do this with
> http://wiki.openstreetmap.org/wiki/OSM_Server_Side_Script
Yes. To appeal to [1], replace in the URL (in one line)
http://78.46.81.38/api/interpreter?data=%3Ccoord-
query%20lat=%2251.0%22%20lon=%227.0%22/%3E%3Cprint%20mode=%22body%22/%3E
the values 51.0 (latitude) and 7.0 (longitude) by the respective values. Then
save the file to disk and you receive an OSM-alike file with the areas that
cover the given location.
Another, maybe more convenient way would be (command line in one line)
wget -O - --post-data="<coord-query lat=\"51.0\" lon=\"7.0\"/><print
mode=\"body\"/>" http://78.46.81.38/api/interpreter | gunzip
The details are explained at
http://78.46.81.38/#section.reverse_gazetteer
Cheers,
Roland
More information about the talk
mailing list