“Woah, it’s empty! Could it be that there are no restaurants near me?” asks Bob.
Not really. See, our first statement node(2190458950)
is already a node, so filtering it further wouldn’t do anything! And since we added a new filter (restaurants) to a statement that we know gives us a tree, we basically asked OSM to further filter our result set (a tree node) to only show restaurants, which obviously results in OSM nothing (since a tree is not a restaurant)!
Our previous examples worked because we filtered for nodes with tags present in an area (the bounding box
with lat/lon points). We essentially queried for nodes in an area, then used filters to filter it down to a tree.
Right now, since our node is already a node, we can’t just use a filter to get a restaurant from it. We have to get a new area from the node.
To do this, we can make great use of another filter, named around
.
by tag
filters, around filters are surrounded by parenthesis, and follows the format (around:n)
where n
is your distance radius in meters. Let’s try setting the distance radius to 50.node
followed by your around filter
. Make sure to follow the format in 2!