Hello, i've been experimenting with Overpass and Nominatim for about a day now, but i can't seem to find the query that would yield the results i require. I am initially given a coordinate (lat+lon) and need to find the way at this point (later on i will need to find intersections, too). I also need the nodes that make up the way. All the results i got from overpass were either none, in a bounding box that clearly has a way in it, or they were more than 20 MBs of data, which is clearly too much for the bounding box i used. One of the queries i used was this: <query type="way"> <bbox-query e="13.384931" n="52.477775" s="52.476769" w="13.386497"/> </query> <print/> Can anyone help me with this? asked 25 Sep '14, 09:20 Leopard2A5 |
You mixed east and west, try this instead:
Usually this should be checked by the API but it obviously isn't for some reason. answered 25 Sep '14, 13:20 scai ♦ 2
facepalm Thanks for noticing that, scai, switching east and west yields the expected results!
(25 Sep '14, 13:31)
Leopard2A5
|
If you need a way around a specific coordinate, you should probably take a look at the Overpass API 'around' filter rather than a bbox query. Bbox is ok'ish, but honestly it doesn't fit your use case all that well. See link for more details. answered 26 Sep '14, 18:13 mmd |
I think what you want is to query
type:way
which will return all ways in a bounding box. Note, it will not return nodes or relations, only ways.
I used the very helpful Query Wizard while you may be using the more demanding Overpass Query Language.
Hi Dave, thx for the reply. I tried the wizard with "type:way" and it returned quite fast, marking all ways on the bbox i was currently looking at. It built the following query:
<osm-script output="json" timeout="25"> <union> <query type="way"> <bbox-query {{bbox}}=""/> </query> </union> <print mode="body"/> <recurse type="down"/> <print mode="skeleton" order="quadtile"/> </osm-script>
however when i replace {{bbox}} with the bbox-spec i'm interested in, the result is empty, allthough the given coordinates contain part of a way: <bbox-query e="13.384931" n="52.477775" s="52.476769" w="13.386497"/>