I'm trying to figure out if Overpass-API's bbox-query should be returning ways that:
The docs suggest that it should do #3. http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Bounding_box_clauses_.28.22bbox_query.22.2C_.22bounding_box_filter.22.29
A way is found not only if it has a node inside the bounding box but also if it just crosses somewhere the bounding box.
But, in practice I'm seeing that it's basically only #1. Which is much less useful as that makes it difficult to make sure you've got all the ways which affect your bounding box.
I think I misunderstood. It does seem to return the ways that only intersect, ie #3, even if they have no nodes in the box. But I was confused because in my query I was also getting nodes and doing a union. It doesn't get the nodes for the way so Overpass-Turbo UI can't render the way. By recursing down, it gets the nodes as well and shows what I expect.
I was further confused because I was doing a query for relations as well, which finds many intersecting relations.
For example
<osm-script output="xml" timeout="25"><!-- fixed by auto repair -->
<!-- gather results -->
<union>
<query type="way">
<bbox-query w="-79.39941" s="43.64019" e="-79.39798" n="43.64120"/>
</query>
<query type="node">
<bbox-query w="-79.39941" s="43.64019" e="-79.39798" n="43.64120"/>
</query>
</union>
<union>
<item/>
<recurse type="down"/>
</union>
<!-- print results -->
<print mode="meta" order="quadtile"/>
</osm-script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With