I can make an area in Overpass QL, using name and relation attributes (tags) filter of element, something like this:
But searching via name is not so stable, and will broke if element name is changed. So much better (for performance too) is to make an area from element id. Here is example of searching relation via it's element id:
And can't understand, how to pass element type and id to area query? Something like this:
or other variants like Can anyone give me an example, how to make area from OSM element by it's id? asked 09 Nov '20, 09:34 Murz |
From the wiki:
https://overpass-turbo.eu/s/ZTF
Multiple areas can be combined (note the 'id:'):
answered 09 Nov '20, 12:38 DaveF Thanks for solution! It is very interesting trick with id's, that I don't know before.
(09 Nov '20, 12:42)
Murz
|
Other solution, provided from @mmd, is to use result of fist search via id of element as area, example:
answered 09 Nov '20, 12:43 Murz That's basically the same but with a conversion: https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Map_way.2Frelation_to_area_.28map_to_area.29 btw where did @mmd post the reply?
(09 Nov '20, 13:01)
DaveF
In Slack, because I ask similar question in Slack too, but before creating question here.
(09 Nov '20, 13:19)
Murz
|