If I want to query for certain objects within an area, it's quite easy:
area(...);
node(area)[natural=peak];
out;
But what if the area is defined as a relation in the OSM database? I could query for the area like this ...
(rel(...);>;);
out;
... but how can I use the area filter on it then?
You can either apply the same filter criteria to area, as you would for your relation - or - use map_to_area to calculate the corresponding area for a relation:
rel(...);map_to_area;
node(area)[natural=peak];
out;
Check out the documentation for more details.
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