Skip to content

Route Masters

Ryan Bush edited this page Sep 15, 2026 · 3 revisions

Route masters

In PTv2, every bus or tram route should belong to a type=route_master relation: one relation per line, holding every variant of it. Bus 9 running one way and Bus 9 running the other are two route relations, and the route master is what says they are the same line.

Relatify shows you the master a route belongs to, lets you put a route into one, and lets you work through every variant of a line from the master itself.

Please Note: If editing multiple routes from the same route master, please allow a few minutes for the changes to be picked up by Overpass.


Where to find it

What you want Where
See which master a route is in Route master block, under the tag table, while editing a route
Put a route into a master Same block - Find route masters or Create one
Take a route out of a master Same block - Remove this route
Edit a master's tags Edit tags in that block, or Edit its tags in the variant list
Work through a whole line Enter the master's id, or Show all variants

The Route master block

Load any route and the block sits between the tag table and the warnings.

Screenshot 2026-09-14 at 19 33 35

When the route is already in a master it shows the master's name and id, a link to it on openstreetmap.org, and every variant it holds. The one you are editing is marked (this route); the others are buttons that load that variant in place, with a 🔗 beside each if you would rather open it on osm.org.

It will also tell you when something looks wrong:

  • Its ref is 72, but this route's is 71. - the master and the route disagree about the number.
  • It is a master of tram routes, but this is a bus route. - route_master does not match the route's own kind.
  • This route is in 2 route masters. It should be in only one. - nothing is offered to change while that is true; untangle it first.
  • 1 more member not listed. - the master holds something that is not a route relation, or more members than were looked up.
  • Could not check whether this route is in a route master. - the lookup failed. Nothing is offered, because an empty answer here would read as "not in one" and invite you to create a second master beside the one it is already in. Reload the relation to try again.

Putting a route into a master

When the route is in none, the block says Not in a route master.

Finding one

A route master is found by ref, so a route being created shows

A route master is found by ref, so fill one in above.

until you fill one in. Once there is a ref, press Find route masters. Relatify looks for other routes with the same ref in the area you have downloaded, and offers the masters those routes belong to.

Screenshot 2026-09-14 at 12 01 11 Screenshot 2026-09-14 at 12 01 25
  • Nothing is looked up until you ask. Searching is one Overpass query, and you may not care about masters at all.
  • If exactly one candidate matches both the ref and the network, it is queued for you, labelled "This route will be added to Bus 9, which its ref and network match." Press Undo if that is not what you wanted.
  • More than one candidate and you pick from the list, then press Add to it.
  • Nothing found says so: "No route master was found for ref 9 in the downloaded area."

Change the route's ref afterwards and the result is set aside - what was found for the old ref is not an answer about the new one - so search again.

Screenshot 2026-09-14 at 12 01 32

Creating one

Create one makes a new master for this route. It is seeded from the route's own tags:

Tag Value
type route_master
route_master the route's own kind - bus, tram or trolleybus
ref the route's ref
name Bus 9, Tram 3, Trolleybus 12
network, operator, colour copied, when the route has them

The tag table opens so you can change any of it. type and route_master are locked - they are what makes the relation a master and what Relatify reads it back by.

Screenshot 2026-09-14 at 12 08 46

The ref stays in step, both ways. Correct the route's ref and the new master follows it; correct it on the master and the route follows. Anything you have typed over by hand is yours and is left alone - change the master's name to Bus 9 (Wroughton) and it keeps that name however the ref moves afterwards.

Clearing the master's ref does not clear the route's.


Taking a route out of a master

Remove this route queues taking it out. The block then says "This route will be removed from it", with Keep it here to undo. Once every master it is in is being left, you are offered somewhere else to put it.


Editing a master's tags while editing a route

Edit tags in the Route master block opens the master's tags beside the route's. They are uploaded with the route, in the same changeset.

Only the tags you actually change are written. Everything else keeps whatever is on the server, so you will not clobber somebody else's edit to an unrelated tag.


Working through a whole line

Editing a number used to mean finding each of its routes in OSM and copying the ids over one at a time. Instead, hand Relatify the route master's id.

Three ways in:

  1. Type the master's id into the relation box on the front screen.
  2. Click a variant in the Route master block while editing a route.
  3. Show all variants in that block, which opens the master of the route you are on.
Screenshot 2026-09-14 at 19 22 12

The list shows the master's name and id, how many variants it holds, and each variant with its ref, name and where it runs from and to.

  • Edit loads that variant exactly as if you had typed its id.
  • « Change route goes back to the front screen; ↻ Reload fetches the master again.
  • Upload a variant and you land back on this list, with that one marked Uploaded in this session and its button reading Edit again. The next variant is one click away.
  • A member that is not a PTv2 route Relatify can open is listed, but without an Edit button: "Not a PTv2 route this application can open, so it is left alone here."
  • A master holding something that is not a route relation says so: "It also holds way/9, which a route master should not."

Nothing is downloaded for the master itself - only the variant you pick. Each is fetched fresh when you select it and uploaded on its own.

Unsaved work is protected. Leaving a route that has queued stops, stop positions, stop areas, tag edits or master changes asks you first, and so does leaving the list with unsaved master tag edits.


Checking the variants against each other

Seeing a line's variants side by side is how you notice that one of them is wrong. The list reports, naming the variants each point is about:

What it checks Example
A variant's ref differs from the master's #17720127 has a ref other than 9.
A variant has no ref at all #17720127 has no ref.
A variant is a different kind of route #17720127 is not a bus route.
network, operator or colour differs from the master's #17720127 has a different operator from the master (Stagecoach West).
The variants disagree with each other, where the master says nothing The variants give 2 different values for operator: Alpha, Beta.
A variant does not say where it runs #17720127 does not say where it starts or ends.
Screenshot 2026-09-14 at 19 41 45

Anything neither side states is left alone: a tag the master does not carry is not one its variants are wrong about. Nothing here changes anything - they are things to look at.


Editing the master from the list

Edit its tags opens the master's tags in the list, without going through one of its routes first - which is a strange place to stand to fix the operator of a whole line.

Screenshot 2026-09-14 at 19 22 22

Because no route is being edited here, these go up as a changeset of their own, with Upload route master or 💾 Download .osc. What the master holds is untouched: only its tags change.


What ends up in the changeset

Relatify writes the comment for you. Alongside the route's own clause you will see:

  • ; created route master
  • ; added to route master #17720128
  • ; added to route master #17720128 and edited its tags
  • ; removed from 1 route master

A master edited on its own from the variant list gets its own comment: Updated route master: Bus 9, #17720128.

You can always type your own comment instead.


When it refuses

Relatify asks OSM again at upload time rather than trusting what it downloaded, so it will stop rather than make a mess:

Message What happened What to do
this route is already in route master 17720128 … so a new one would be a duplicate Somebody put it in a master since you downloaded Go back and press ↻ Reload
relation 17720128 is no longer a route master Its tags changed under you Reload
Tag name was modified Somebody edited the same tag meanwhile Reload and redo your edit
Route master 100 cannot be joined and left by the same changeset Contradictory queued changes Undo one of them

Limits

  • One route is uploaded at a time. Working through a line is several changesets, one per variant.
  • Candidate masters are only found within the area you have downloaded. Pan to grow it if a sibling is further out.
  • type and route_master cannot be edited here, on a master; nor can type, route and public_transport:version on a route.
  • Only bus, tram and trolleybus routes are supported, as everywhere else in Relatify.