From OpenStreetMap Wiki
Jump to navigation Jump to search
Relatify instrutions.jpg
Author: Kamil Monicz (Zaczero)
License: AGPL-3.0 (free of charge)
Platform: Web
Status: Active
Version: 1.2.2 (2024-01-11)
Language: English
Source code: Zaczero/osm-relatify
Programming languages: Python, HTML, CSS, and and JavaScript

OpenStreetMap public transport made easy

OSM Relatify is a tool that simplifies the process of maintaining public transport relations.

Currently, only bus routes are supported. You can check out the current planned features here.

For general instructions on how to use the tool, please refer to the image on the right.

How to use

This section is not yet complete, I encourage you - the community - to write it :-)

Loading a relation

First you need to get the relation ID from OSM and enter it in the dialog. It has to be a bus route relation in the Public Transport v2 (PTv2) standard.

For example, has the relation ID of 1994624. If you paste the URL instead, the relation ID part will be extracted automatically.

This image showcases the "Enter a bus route relation" dialog.

Creating a bus route

Create the Bus Route relation and associated objects

Relatify can not currently create nodes, ways, or relations, so before using Relatify to create a bus route, use your favorite OpenStreetMap editor to do the following:

  • Create all of the highway=bus_stop nodes along the route.
  • Ensure that the highway ways at the beginning and end of the bus route are properly split, so that there is an end of the way adjacent to the first and last bus stops.
    A highway split at the start of a bus route.
  • Create a bus route relation with: the first bus stop node, and the first highway way along the route.
    • For more details on tagging bus route relations see: Buses

Upload your changes to OpenStreetMap, and then grab the ID of the bus route relation you created.

To get the relation ID in the iD editor, select the relation and click "view on" on the bottom right. To get is JOSM, select the relation, and choose View > Advanced Info.

Using Relatify to add highways and bus stops

Go to Relatify, put the bus route relation ID in the field, and click Load.

If you get an error when attempting to load the relation: try waiting a few minutes -- sometimes there is a delay between the creation of the relation and Relatify being able to see it in the OSM API. If the error persists, double check that you tagged the relation correctly as a bus route, and it has at least one highway=bus_stop as a member with role=platform, and at least one highway way as a member with a blank role.

Once your relation loads, you can select highway ways adjacent to the first way in the relation to add them to the route.

  • Highways with highway=service and service=driveway, parking_aisle, or emergency_road can not be added to a bus route, if your route traverses a highway tagged with these, you'll need to correct the tagging in another OSM editor, or if the tagging is correct, add psv=designated or bus=designated to the way.

As you select highways close to bus stops, you'll be able to click on the bus stops to add those to the route.

Adding ways and bus stops to a route (click to view animation)

Once you've reached the last stop, right click on the last highway way in the route, and select 'Set End.'

Select the end of a bus route

At this point, Relatify will typically automatically identify the 'start' of the bus route automatically -- however it's a good idea to confirm that it has placed the start on the first way of the route. If it hasn't, right click on that way and choose Set Start.

If Relatify identifies any problems with the route, it'll show you those, and they'll need to resolved.

Once the route is complete, and any problems are resolved, you can click Finish Editing and upload your changes to OpenStreetMap.

External links