NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am mapping several bus routes in São Paulo, Brazil, and while adding one specific route, I found that the bus passes twice in the same direction through a way, when going from one end point to the other.

So, the question is: Is it correct to add this way twice to the same relation as I did?

Is there some alternative form of doing this without adding the way twice to the relation in the same direction? JOSM allows it, but warns me and shows the way in a red background (and that usually means something wrong...)

The way in question is # 237169404 (OSM), and the relation is # 3191062 (OSM)


Edit: Added the return route # 3193918 (OSM) and the route_master relation # 3193919 (OSM)

asked 09 Sep '13, 01:11

MCPicoli's gravatar image

accept rate: 24%

edited 09 Sep '13, 17:59

Yes, as far as I know, adding the way twice in the relation is the correct thing to do. Otherwise, you'll end up with a gap in the bus route, which is semantically incorrect. Remember to order the ways correctly; JOSM displays wether ways are connected to each other or not.

The annoying thing is that JOSM's validator will warn you about the duplicated way, but this particular warning can be ignored. JOSM's validator is great, but not free of false positives. If you can, consider helping the JOSM devs to fix this particular false-positive.

permanent link

answered 09 Sep '13, 10:48

Vincent%20de%20Phily's gravatar image

Vincent de P... ♦
accept rate: 19%

It isn't wrong to add the way/role twice to the relation, but at one time in the past the relation wouldn't be preserved by other editors (it might be OK now). One solution is to create another relation for that loop, and have an overall route_master relation to identify all relations making up that route.

permanent link

answered 09 Sep '13, 12:13

Mike%20N's gravatar image

Mike N
accept rate: 17%

How would you tag the route_master relation regarding the loop and the main "course" of the bus route? I already added the route_master for this bus line (# 3193919 OSM). Thankfully no loops on the return route...

(09 Sep '13, 17:57) MCPicoli

Right now, there is no special convention to add the relation members to the master route. Ideally, software should be able to determine the actual vehicle travel path by connecting the end of one route to the beginning of another route.

For this example, I would also add Rua Robério Dias to both routes, indicating that the bus turns around on that street, or add the driveways to the relation to complete the turnaround path.

(10 Sep '13, 14:20) Mike N

So, just so I'm sure, I'm going to use Metrobus route 400 (UK), which runs between Caterham-on-the-Hill, and East Grinstead, as an example...

From Caterham-on-the-Hill, it basically, makes its way from Caterham-on-the-Hill, down towards the Caterham town centre, towards Godstone, Bletchingley, Nutfield and then Redhill. For this part of the route, it's straight forward. There are no parts where it goes through twice along the same route. However, my first question is at Redhill. When it enters "The Stations Roundabout" from the east, it travels around the roundabout and exits at the north (Princess Way), and then enters the Bus Station. It then exits the bus station, and enters the roundabout again, from the north, and travels to the south exit. At this point, the part of the roundabout between the east and south would have been traveled on twice. Therefore, would this particular section of the roundabout be split to add a second relation for this route, to avoid a gap?

After it leaves Redhill, it travels south on the A23 towards East Surrey Hospital. At this point, it travels long Three Arch Road, to the roundabout, entering East Surrey Hospital, where it exits again, travelling the other direction on Three Arch Road, back to the A23. Should this be done like this? Assuming Three Arch Road is eastward: A relation on Three Arch Road facing forwards (>>), followed by a relation for the part of East Surrey Hospital where the bus route is, and where it enters Three Arch Road, have a second relation but 'backwards'? (<<)?

For example, let's say it's relation 400... would it be something like this?

Three Arch Road has relation 400, ID 1 facing forwards Part of East Surrey Hospital has relation 400, ID 2 Three Arch Road has relation 400, ID 3 facing backwards?

Trying to explain is more complicated than how it actually is.

And to make things more confusing, after eventually reaching East Grinstead, and then making its way back towards Caterham-on-the-Hill, it enters the hospital again, therefore, on its full route, it'll travel along Three Arch Road east, enter the hospital, exit the hospital, travel west along Three Arch Road, travel south, then continue its route, then eventually, return from the south (travelling north), enter Three Arch Road, travel east, enter the hospital again, exit the hospital, travel west, along Three Arch Road, and then travel north. Essentially, travelling along Three Arch Road twice, in both directions, a total of four times...

And a more general question about routes... for routes where the bus travels from one place to another, before turning around (usually by making a small loop around an area), and then travel along the same route, in the opposite direction, should we have two relations for each way that it travels along in both directions, one being forwards and one being backwards?

permanent link

answered 15 Oct '13, 21:03

TheUltimateKoopa's gravatar image

accept rate: 0%

Use two relations, one for each direction, and one for each possible variant. Do not forget to group them all under a route_master relation!

(17 Oct '13, 19:57) MCPicoli

I usually split the roudabout in parts following the bus route, but the routers may be able to use them without splitting. Note that at least in JOSM, when a roundabout is added to a route, it appears with a special symbol.

(17 Oct '13, 19:59) MCPicoli

OK, so two further questions. Can you 'split' relations? For example, say a route was created with a single relation in both directions. Is there a way of splitting it at a certain point, so that all members of the relation after that point are in a new relation? I.e. can you split it at say the 115th member of a relation, so that the 116th member and so on, are then the 1st member (etc) of a new relation?

Secondly, as in the other question, how exactly do you use the route_master relation? When you've created the route_master relation, what do you actually add to the relation?

(18 Oct '13, 02:32) TheUltimateK...

Please don't post your questions here but instead start new separate questions. This Q&A system is not suited for such discussions.

(18 Oct '13, 07:45) scai ♦

You can mark the ways in the relation editor in blue, then press a button in the middle of the relation editor to have them selected in JOSM's editor window. Now go to the relation editor window of the relation you want to add it to and use one of the middle buttons to add all those ways to this route relation.

(08 Feb '15, 10:09) Polyglot

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 09 Sep '13, 01:11

question was seen: 6,953 times

last updated: 08 Feb '15, 10:09

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum