Wondering how to write an Overpass query to get only nodes with bus_stops from this query:
in shortcut get bus stops by given area and relation. asked 08 Jun '20, 09:46 macik1423 |
OK. We should get only the nodes belonging to the relation. I think it should be better like this :
answered 09 Jun '20, 19:03 zorglubu Thanks a lot! This is what I have been looking for. :D
(09 Jun '20, 21:29)
macik1423
I have another question, is it possible to get order of nodes in data as same as relation in map? For example in this query
order is random, not fit to relation on map.
(12 Dec '20, 11:03)
macik1423
1
I am not sure, but I think that it is not possible directly with overpass. In my mind, the order is the one of the BDD. I am interested if somebody else has a better answer :-) I have checked this request : [out:json][timeout:25]; relation(5347191); out meta; The order seems to be the one shown in JOSM. Then you will need a post processing treatment.
(12 Dec '20, 11:27)
zorglubu
|
Hello, Could you try :
This should extract the elements of the relation, and then only the nodes with the good tag. answered 08 Jun '20, 17:11 zorglubu Thanks for respond! It's not quite what I expect. Query returns all bus stops (relation "8: Os. Wośniki => Kierzków" and reverse relation "8: Kierzków => Os. Wośniki"), I wanna bus stops from one direction.
(09 Jun '20, 10:14)
macik1423
|
Don't know much about Overpass QL, but if the relation is according to PTv2 it should have a role of
platform
,platform_exit_only
orplatform_entry_only
. In the more traditional tagging they would have no role and you would have to look for nodes nodes in the relation that have thehighway=bus_stop
tag.