JOSM/Plugins/PT Assistant/Mapping Public Transport with JOSM

From OpenStreetMap Wiki
Jump to: navigation, search

Mapping Public Transport with JOSM

How to improve and correct mapping of public transport using JOSM's PT_Assistant plugin.

Configuration

Go to Settings (F12)

Expert mode

Set Expert mode in the bottom left corner

MapCSS

Under Map Paint Styles, install Public Transport MapCSS

Plugins

Under plugins, choose Load from list:

Mapillary
buildings_tools
pt_assistant
todo
utilsplugin2
wikipedia

Downloading data

First let's download some data using Overpass API:

File/Download from Overpass API

[out:xml][timeout:225][bbox:{{bbox}}];
(
  (
    node["highway"="bus_stop"];
    node["public_transport"="platform"]["train"!="yes"];
    node["public_transport"="stop_position"]["train"!="yes"];
  );
  ._;<;
  way["highway"="platform"];
  way["amenity"="shelter"];
  node["amenity"="shelter"];
  relation["route"="bus"];
);
(._;>;);
out meta;

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 a whole city or region at once.

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)

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=cycleway))

Validation

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))