Hi, I am new to OSM and trying to understand Overpass QL so editing of public Transport data in JOSM will be easier in the future. My Question is, why this Overpass QL query won't give me any data, not even the data I just added myself?
As far as I think, this query works this way:
So whats wrong with that query (or the data I added previously). Could anybody explain it to me? P.S.: I just had to type this once again, because the wait for email-validation (after creating a new account) didn't seem to keep this question pending, but instead deleted it. P.P.S.: It is denglish I am writing. If there is a native english speaker here who cares for educating his or hers language: I am listening. asked 09 Jul '16, 11:14 jannefleischer |
Tricky question ... :) Master relations don't have any geometry on their own. That's why your query won't find anything for a given bounding box in step 2 already. I'm not sure if that's a bug or not, at least it doesn't work right now (Github issue opened). I have changed that part of your query to include the network "NVV" and effectively turned it into a global scale query for route_master relations. That's purely a performance tweak to reduce the number of relevant master relations from 21862 down to 64. Now, instead of applying the bounding box filter to the master relation, I'm using the individual bus routes via
answered 09 Jul '16, 11:39 mmd 2
Thanks for your immediate response. I had my problems with the first revision of your answer, but now I think I understood. The problem is, that, since the relation master_route do not contain any geometries, I can't filter it with a bounding box. So I first have to get the sub-routes (tag: route) and use the bounding-box filter over those. Thanks for pointing this out to me. It wasn't that trivial as I expected it to be, after all. :) The wizard provides a template called (in german) „Hauptroute" which does it wrong, too. Reported it: https://github.com/tyrasd/overpass-turbo/issues/254
(09 Jul '16, 12:28)
jannefleischer
Just a note: this answer helped me create a query to render a relation and it's subrelations (queried by master relation ID): http://overpass-turbo.eu/s/hTR
(17 Aug '16, 10:20)
joost schouppe
@joost schouppe:
(17 Aug '16, 11:53)
mmd
I noticed it does make a small difference: it also returns the tagged nodes that are members of the ways of the relations, whereas the other approach just returns member relations.
(17 Aug '16, 12:00)
joost schouppe
|