By providing a single coordinate, not a bounding box, I want to extract the administrative areas that is within the coordinate. For example when providing the coordinate for central London, I would like to know all the boundaries that covers the coordinate, actual country, region, sub region administrative area etc. Is it possible to get such information from overpass? What I am asking for is more or less the same informatio that is given by using the questing mark function i open street map where it presents all such information. I need to know the id of the boundary, the administrative level and the name of the boundary. An I also would like to know the actual boundary as a polygon. I want to access it by using either php or javascript... asked 07 Feb '16, 10:30 SunYour |
The is_in query does just that. Read all about it here: http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Query_for_areas_.28is_in.29 answered 07 Feb '16, 11:55 maxerickson Thanks, that is what I was looking for! This example is what I need to call http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];is_in(59.68,16.77);out; Now I need to adapt my parser that used the lovely mapIt solution, but it unfortunately lacked som issues here and there. I still need to find out how to get the boundary polygon, preferrably as kml if possible.
(07 Feb '16, 16:22)
SunYour
1
You can use http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Print_.28out.29 There is not support for KML output from Overpass API. You can look at Overpass Turbo for an example of converting the output, togpx and tokml here: https://github.com/tyrasd/overpass-turbo/tree/master/libs
(07 Feb '16, 17:08)
maxerickson
|