I want to export all relations with tags such as boundary=administrative and all childs of those relations in a certain area. I'm using Overpass API, but I get stuck with the variables. My current code looks as following (with Staden as an example, bigger areas will be used once it works):
But it doesn't work. 'a' is supposed to be a variable holding all features in Staden. And then, according to the documentation I've read, I should be able to use 'a' to get all relations with specific tags in it. Once I have the relations, they should be completed again so I have an OSM file that can be displayed. And I hope, once the syntax error is resolved, that the query doesn't include boundaries of neighbour villages. If anyone has an idea on how to get those out, you would be very welcome. It might also be a good example to put on the wiki. asked 11 Dec '12, 14:52 Sanderd17 |
Please put the ".a" after "rel". Otherwise, you should have seen a syntax error:
The syntax is here different from the syntax of "out", because it does something different: It reads "take all relations that are contained in .a and have a tag with the given values". In particular, you could intersect in a query multiple sets like "rel.a.b" which is not possible in the context of "out". Thank you for asking this question. I'll copy this explanation to the documentation. Please add a link fomr the wiki to this question meanwhile to remind me on this. I'm sorry for the late answer. I try in general a 24h hour check about relevant questions, but for no apparent reason I missed this one. In such a case, please feel free to write me an email to roland.olbricht at gmx.de. answered 17 Dec '12, 07:15 Roland Olbricht No problem, I wasn't in a hurry, it's just that I didn't want the question to fall of the first page. It works great now.
(17 Dec '12, 12:13)
Sanderd17
|
Ping, are there no OpenLayers specialists here?
OverpassAPI, not OpenLayers. Be a bit more patient, Roland Olbricht is stopping by from time to time. He should be able to help you.