<div dir="ltr">There's a bit of confusion around this and it took me quite a while playing around with the relation editor in JOSM ("Select Next Gap") to understand how the "forward" and "backward" roles work.<div><br></div><div><a href="https://i.imgur.com/RGV2XOX.png" target="_blank">https://i.imgur.com/RGV2XOX.<wbr>png</a><br><div><br></div><div>First, consider how you would create a road route relation for your example if the red segment didn't exist.  Also, for the moment ignore the signed cardinal directions of the route.  In that case, you would arbitrarily chose to start from the left-most or right-most segment in the picture.  If you chose to start with the right-most segment:</div><div><br></div><div>right-most (role: "")</div><div>blue (role: "")</div><div>green (role: "")</div><div>left-most (role: "")</div><div><br></div><div>All of the roles would be empty and you would not need to use the roles "forward" or "backward".<br></div><div><br></div><div>Now consider that the red segment exists and you need to indicate that the road route splits in two and then reconverges.  In this case, you would do the following, again starting at the right side of the picture:</div><div><br></div><div>right-most (role: "")</div><div>blue (role: "backward")</div><div>green (role: "backward")</div><div>red (role: "forward")</div><div>left-most (role: "")</div><div><br></div><div>You traverse the segments where the road splits first following the direction of the route and then backtracking to the point where the road splits and then start adding segments with empty roles.  If either blue, green, or red is reversed in direction, then they would need to have the role "backward" instead of "forward", but would still retain the same position in the list (by convention red should not be reversed since it has oneway=yes).</div><div><br></div><div><br></div><div>So now consider that you want to change the route to indicate "east" and "west" signed cardinal directions.  </div><div><br></div><div>One idea is to leave the roles as "forward" and "backward" and just add a direction=west tag on the relation object.</div><div><br></div><div>One idea is that "east" and "west" become synonyms for "forward".  First, reverse the direction of blue and green and change their roles to "forward".  Then change the roles to "east" and "west":<br></div><div><br></div><div><div>right-most (role: "")</div><div>blue (role: "west")</div><div>green (role: "west")</div><div>red (role: "east")</div><div>left-most (role: "")</div></div><div><br></div><div>In this case, it is critical that blue and green are not reversed again.</div><div><br></div><div><br></div><div>Another approach is to create separate route relations for each direction of the route.  In that case, you would have one relation with direction=east:</div><div>left-most (role: "")</div><div>red (role: "")</div><div>right-most (role: "")</div><div><br></div><div>And a separate relation with direction=west</div><div><div>right-most (role: "")</div><div>blue (role: "")</div><div>green (role: "")</div><div>left-most (role: "")</div></div><div><br></div><div>In this case, it will also help to update the name tag of the relation to include "(East)" or "(West)" to more easily tell the route relations apart in the editor.  Also, the relations can be added to a route_master relation (type=route_master  route_master=road).</div><div><br></div><div><br></div><div>Overall, I think it is cleanest to create 2 route relations, 1 for each signed cardinal direction of the route.  You don't have to arbitrarily decide whether to start the route at the eastern or western terminus as each route relation has a natural starting point based on the signed cardinal direction.  You don't have to deal with roles on member Ways, which are very confusing.  You don't have to worry about the direction of each member way either (again in practice many of them will be marked oneway=yes and have the direction following the flow of traffic).</div><div><br></div><div><br></div><div>Note that whatever approach you chose, the route relations will often break when the member Ways are split or combined.  Not all OSM editors do the right thing to preserve the contiguousness of the route relations when performing these operations.  When people decide to add lane or speed limit information to the roads that make up the route, they may inadvertently break the route relation.  In the rare case where multiple users are concurrently splitting Ways that belong to the same route relation, the relation usually breaks.</div><div><br></div><div>Peter</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 26, 2016 at 9:29 AM, Albert Pundt <span dir="ltr"><<a href="mailto:roadsguy99@yahoo.com" target="_blank">roadsguy99@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:helveticaneue,"helvetica neue",helvetica,arial,"lucida grande",sans-serif;font-size:16px"><div id="m_463827987375309834gmail-m_-4297653447266945231yiv3961123457"><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20123"><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:helveticaneue,"helvetica neue",helvetica,arial,"lucida grande",sans-serif;font-size:16px" id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20122"><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr">So I understand that one-way ways carrying a route (e.g. a one-way pair or divided highway) should have relation roles of north/south/east/west, but say you have a situation like <a class="m_463827987375309834gmail-m_-4297653447266945231edited-link-editor" href="https://i.imgur.com/RGV2XOX.png" target="_blank">this</a>. Say you have an east-west route that follows the primary roads in that picture. The eastbound direction follows the channelized right turn slip ramp, marked with a red arrow. The westbound direction follows the blue-arrow way, before turning left onto the green-arrow way.</div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr"><br></div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr">How should relation memberships and roles be assigned here? I would think that the slip ramp would be part of the relation, since right-turning traffic must follow it. Ideally, that would be given the role "east", but what about the green and blue ways? It might seem right to give them the role "west", but how then is it differentiated which direction is westbound for it? Since all the ways in this picture are arranged "pointing" north or east, the green and blue ways would need to be given the role "backward", which is the older way of doing things that can't specify cardinal direction. Is replacing the single relation with separate relations for each direction the only good way to do this, or are such two-way segments the only times that "forward" and "backward" roles should be used?</div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr"><br></div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr">I checked the <a class="m_463827987375309834gmail-m_-4297653447266945231edited-link-editor" href="https://wiki.openstreetmap.org/wiki/Highway_Directions_In_The_United_States#Role.3Dforward" id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_26828" target="_blank">wiki page</a>, but it doesn't seem to specify. Instead, it just says such cases are very rare (which is only true relatively speaking, as routes very commonly turn at intersections with channelized right turns, making situations like the linked example very common.</div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr"><br></div><div id="m_463827987375309834gmail-m_-4297653447266945231yui_3_16_0_ym19_1_1482771935482_20121" dir="ltr">--Roadsguy</div></div></div></div></div></div><br>______________________________<wbr>_________________<br>
Talk-us mailing list<br>
<a href="mailto:Talk-us@openstreetmap.org" target="_blank">Talk-us@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/talk-us" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/talk-us</a><br>
<br></blockquote></div><br></div></div></div></div>