Is it at all possible to define bbox for query as “a bbox that contains all elements of a set”?
What I really want to do at the moment is:
get all the waterways with name=Liwka in Poland into a set named, say .myWaterWay
get a bbox, containing all the elements of the set .myWaterWay
get all the waterways in the above bbox
This would get me all the waterways around Liwka, that I could load into JOSM, select all the waterways named "Liwka" plus all the waterways that should be named "Liwka", but somehow they have no name in OSM, and do something to them (like, create a waterway relation).
Liwka is, of course, just an example, I’m looking for a way to simplify creating waterway relations correctly.
Bounding boxes need to be provided as values, i.e. it is not possible at this time to have some kind of parameter here. Breaking it up in two queries would of course be possible, I guess that’s not what you wanted.
However, the next Overpass version will come with a new complete statement, which could be useful here.