24.10.2017 | Michael Reichert
We recently rewrote the Public Transport views of our OSM Inspector. The old views had been used rarely and were of limited use, so we went for a full rewrite. While the old views aimed to give an overview on both the infrastructure and the network, the new views are focussed on the routes and stops.
The public transport schema used today was proposed back in 2010/2011 but it was adopted rather slowly. Also, many mappers made lots of mistakes when trying to use the schema because the documentation on the wiki was confusing. To clearly distinguish public transport mapping that follows this schema from old-style public transport mapping, new schema is now called “public transport v2” – even though there really wasn’t ever a version 1.
The new views of OSM Inspector try to support good mapping according to the “public transport v2” scheme, and act as a validator.
Here’s how you can use the two new views to do some public transport mapping:
The Stops view shows stop positions and platforms (multipolygons are not supported yet). Go to an area you are familiar with and check if there are missing bus stops. Use this view on zoom levels 10 and 11 to spot (rural) areas where no bus stops are mapped at all. Just take your car or bicycle and visit them!
Platforms are rendered in blue, stop positions in green. Bus stops with highway=bus_stop
but without a public_transport=*
tag are rendered in orange. They are not errors if they are the only object that represent a bus stop (per direction).
The Routes view shows route relations which claim to be v2 route relations (they have the tag public_transport:version=2
). The view shows whether a route is valid (green) or not (black) and highlights objects which are either the reason of invalidity or which are located next to the invalidity (orange and purple).
The tagging schema defines minimum requirements a route must comply with:
stop
or stop_entry_only
.platform
, platform_entry_only
or platform_exit_only
.(Even though many mappers seem to think so, you do not have to map both the stop position and the platform. One is enough. Especially for vehicles where the platform and the vehicle are short, adding stop positions is overkill. But if a stop has both, both have to be added to the route relation.)
A correct route relation of a bus line would look like this (roles are given in parentheses):
- stop position of station 1 (stop)
- platform object of station 1 (platform)
- stop position of station 2 (stop)
- platform object of station 2 (platform)
- ...
- stop position of station n (stop)
- platform of station n (platform)
- first way with highway=* ()
- second way with highway=* ()
- ...
- last way with highway=* ()
That’s how it would look like in JOSM’s relation editor:
As said above, mapping both stops and platforms is not mandatory. One of the two is enough. (If you know the location of the platform and/or the bus stop sign, add it. Otherwise the stop position is a good replacement.) Therefore, the route could also look like this:
To get quickly a working validator, we decided not to implement all checks. Here is the list of implemented validation tests:
stop
, stop_entry_only
, stop_exit_only
, platform
, platform_entry_only
, platform_exit_only
.stop
, stop_entry_only
, stop_exit_only
, platform
, platform_entry_only
, platform_exit_only
or an empty role.platform
, platform_entry_only
, platform_exit_only
.trolley_wire=yes
(or trolley_wire:forward/backward=yes
). Roads/tracks under construction trigger errors.route=*
tag of a route relation must have one of the following values: train
, tram
, subway
, bus
, trolleybus
, ferry
, aerialway
.There are some ideas for more tests but they haven’t been implemented yet:
osmi_pubtrans3 is free software, and patches are welcome.