[Talk-transit] Extract Public Transport Information from a OSM file of city

Paul Schulz paul at mawsonlakes.org
Fri Aug 30 11:38:38 UTC 2013


I have not done this yet.. but the following is the approximate process
that I would follow:

Pre-checks..

1. Have a look in the 'public transport' layer on OSM. Does it show the
routes you are after?

http://www.openstreetmap.org/#map=13/-34.8289/138.5991&layers=T

If it doesn't, then you may need to organise/arrange for them to get into
OSM first.

2. Install and run JOSM and pull in a small area and see how the public
transport relations show up. Zoom in o a stop (if you're aware of one and
see it it's included in the relation).

Ok.

You get the transport data out, you need to extract all the relations in
the data that are tagged with the following:

- type=bus
- route=bus (if you are looking for bus routes)
The 'osmosis' tool should allow you to do this, using the '--tag-filter'
option, with 'accept-relations' and '--used-way' and '--used-node' options
to all the references data. (I have not done this though).

You should be able to use .pbf or .osm (XML) formats for either input or
output.

See the other replies for using the 'overpass' API. This doesn't need you
to download the data.

On 30/08/2013 8:39 PM, "Qipeng SONG" <qipeng.song at telecom-bretagne.eu>
wrote:

> Hello, everyone!
> I have downloaded the complete OSM file for a certain city, now I need to
> extract all the public transport information present in this OSM file.
> Have you some tools or advises  for this task?? Or maybe we need to write
> ourself some scripts to implement this???
> Thanks very much
>
> ______________________________**_________________
> Talk-transit mailing list
> Talk-transit at openstreetmap.org
> http://lists.openstreetmap.**org/listinfo/talk-transit<http://lists.openstreetmap.org/listinfo/talk-transit>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk-transit/attachments/20130830/7d3d7963/attachment.html>


More information about the Talk-transit mailing list