JOSM/Plugins/PT Assistant/Mapping Public Transport with JOSM
- 1 Mapping Public Transport with JOSM
- 1.1 Configuration
- 1.2 Downloading data
- 1.3 Validation
- 1.4 Convenient search expressions
- 1.5 Map a bus stop
Mapping Public Transport with JOSM
How to improve and correct mapping of public transport using JOSM's PT_Assistant plugin.
Go to Settings (F12)
Set Expert mode in the bottom left corner
Under Map Paint Styles, install Public Transport MapCSS
Under plugins, choose Load from list:
The relevance for mapping public transport becomes less for the ones at the bottom of the list.
pt_assistant utilsplugin2 buildings_tools terracer todo Mapillary OpenStreetCam wikipedia tag2link OpeningHoursEditor measurement RoadSigns reverter undelete markseen scripting
Use F12, last vertical tab and search for properties.recently-added-tags
I like to set it to 12 or 15. 5 is a bit too low for convenience.
First let's download some data using Overpass API:
File/Download from Overpass API
This query works well for working on bus route relations. It will result in a skeleton of highways sprinkled with stops. For larger areas increase the timeout, but don't go beyond 600.
It's probably better to use it on smaller areas at first. 1 pair of stops, maybe a bus station, before you try downloading a whole city or region. Since everything is interconnected, it's quite hard to keep the changesets small and manageable, as soon as ways are split.
Another query for train lines
With the PT_Assistant plugin installed, use the validator button with nothing selected.
All the categories prepended with PT: are issues found by the plugin. Ideally all are resolved before uploading.
PT: Route should start and end with a stop_position
Use right mouse button to Zoom to problem. Then press the select button. You will see the route gets highlighted in purple.
The stops get labels based on ref and on their sequence in the route.
Either the order of the stops is wrong, which can be fixed with
- Tools Sort PT stops
or a stop_position is missing.
You can add one using the new map mode:
- Add stop_position node
If you add such a node on the first or last way of a route relation, the way is automatically split and only the correct part is kept in the route relations.
If it's a way in the middle of the route relation, a stop_position node is added to the highway, but the way is not split.
The easiest problems to fix are:
PT: Route contains a gap that can be fixed by sorting
As those will resolve all the problems where the ways are not in the right order anymore
A new category is:
PT: route gaps can decrease by sorting members. Further validation will be required
Those fixes don't solve all the problems with the ways sequence. It may also be an indication that this route wasn't converted to the version 2 scheme yet.
PT: Route passes a oneway road in wrong direction
When the fix button is pressed, a route relation editor is opened, with the ways where the route goes against oneway traffic selected. It's thus easy to remove those ways and replace them by another set of ways. Or, it can also happen oneway:bus=no needs to be added to those ways. They are also selected in JOSM's Map view.
Convenient search expressions
To find all the nodes that should be tagged as public_transport=platform:
highway=bus_stop (-public_transport OR public_transport=stop_position) (-child highway OR child highway=footway OR child highway=platform OR child highway=cycleway OR child highway=sidewalk OR child highway=path)
To find all the nodes that should be tagged as public_transport=stop_position:
((highway=bus_stop -public_transport) OR public_transport=platform) (child highway -(child highway=footway OR child highway=platform OR child highway=sidewalk OR child highway=path))
Map a bus stop
Hover over the screenshots for some more info.
Bus stop in New Zealand
Progressively adding more and more detail to a pair of bus stops in Christchurch, New Zealand
We start with 2 nodes tagged
Zoom in and select the southern stop node.
Let's add the stop's name and a
We can also add a
- route_ref=* tag (values are separated by semicolons)
and add the nodes to the appropriate route relations. PT_Assistant shows the values in pink, based on relation membership, the public transport MapCSS style shows the value of the tag. So it becomes possible to compare them.
Now select the node on the northern side of the street. If the tags are the same, it's possible to use Shift-R to repeat them on this node.
On this side of the road there is a shelter. Using the buildings_tools plugin, it's easy to draw a rectangle and have the tags
I like to reuse a node of the shelter or a platform way, but that's just personal preference.
This is actually a dual carriageway, so use p to split the way and draw two oneway roads.
Let's get fancy and add a bus bay
There is no need to copy the stop's details to this stop_position node and there is also no need to add it to the route relations. There isn't even a real need to add the stop_position nodes, except for the first and the last stops. In that case, you can also split the ways there. PT_Assistant will do this for you automatically if you add a stop_position node to a way that is the first or the last in the route relations used by this way.
If there is an actual platform present, you can also add a way or area tagged