This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Export only public transport route

2

Hi, I would like to export (or modify the exported file) such that I get only the transportation route.

Any suggestions?

Michele

asked 10 Sep '13, 13:42

aliekor's gravatar image

aliekor
31113
accept rate: 0%


One Answer:

3

You can query Overpass API with a query like the following:

(rel[network=VRS][ref=636];>;);
out meta;

It searches for the bus line 636 in the network VRS. Other tags can be used for selecting in the same way. For convenience the query as a link: http://overpass-turbo.eu/s/112

answered 11 Sep '13, 08:13

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

Thanks, but how can i get the boundaries of the map I am exporting?

(11 Sep '13, 09:27) aliekor
1

The boundaries are just the smallest/largest lat and lon values of the appearing nodes. So it is straightforward to determine them.

(12 Sep '13, 08:54) Roland Olbricht

@aliekor: or do you want to limit the area by a bounding box where the query should be made from?

If yes, this is possible: Read https://wiki.openstreetmap.org/wiki/Overpass_API very intensively ... there are many possibilities.

(12 Sep '13, 16:53) stephan75

Source code available on GitHub .