﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
19633	[patch] Route relations with split start do not show links as expected in the relation editor	matthijs	team	"When defining routes, there can be splits in the route when the route going forward uses different ways than the route going back (e.g. with one-way streets or separately mapped cycleways on both sides of the street). This uses the ""forward"" and ""backward"" roles. When such a split happens in the middle of a route, the relation editor nicely reflects this in the third ""link"" column.

In the Dutch cycle node network, routes are frequently split at the start or end as well. This means that a given cycle node number is present in two or more places (close together, e.g. at opposite sides of a bridge or road), since there are multiple places where you can arrive at a given cycle node and find directions to move on to the next node (depending on where you are coming from). For example, see [https://cycling.waymarkedtrails.org/#routelist?map=18!53.2041!5.7876 here] for how something would typically look.

There has been some [https://forum.openstreetmap.org/viewtopic.php?id=70144 recent discussion (in Dutch, sorry)] about how to best map this. Ideally, one would like to map each route until the first of these multiple nodes that a route encounters, and use one ore more additional routes to connect the nodes with the same number (for routing purposes).

However, in some cases, such as the one shown above, this would result in a route where the start and/or end of the route is split (e.g. the starting point is one node, but when you traverse the route in reverse, the ending point is another node). Currently, JOSM does not have a meaningful connection graph in the relation editor for the case with a split start of the route (a split end of the route is handled correctly).

This is illustrated by the attached file, which contains a few ways and two routes: One where the start and end are split, and one route where additional ways are added to the route to join them (so that both directions use the same start and ending points). Below, the ""split"" route is selected:

[[Image(https://i.imgur.com/aCXvUtr.png)]]

In the relation editor, the split route looks messy at the start, but as expected at the end:

[[Image(https://i.imgur.com/nZk2vuO.png)]]

The joined route, does look ok in the relation editor at the start and end:

[[Image(https://i.imgur.com/rr42C3W.png)]]

Because of this messy display, it is hard to check that a route is correct. This has led to a practice where routes are closed up at the end with additional one-way route members to make JOSM render the connection graph properly (this is also done with the real-world example I linked above). However, it would be better if JOSM could render this situation better, leaving more freedom to the mappers.

Ideally, I think this situation could be drawn like this:

[[Image(https://i.imgur.com/BNYimbQ.png)]]

I've made a patch that actually implements this, I'll push it to a github PR next. The code that handles this is quite complicated, so it took me a while to find the right place to add this. I haven't done very thorough testing yet, this probably also warrants a unit test (but I couldn't get `ant test` to work quickly, probably because my Junit version is 3.8 and/or because the issues shown at https://github.com/openstreetmap/josm/pull/60), so I'm leaving that for later.


{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-07-30 12:44:04 +0200 (Thu, 30 Jul 2020)
Revision:16812
Build-Date:2020-07-31 01:30:49
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (16812 en) Linux Ubuntu 19.10
Memory Usage: 1413 MB / 2048 MB (33 MB allocated, but free)
Java version: 11.0.7+10-post-Ubuntu-2ubuntu219.10, Ubuntu, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 1280x1024 (scaling 1.0x1.0)
Maximum Screen Size: 1280x1024
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Java package: openjdk-11-jre:amd64-11.0.7+10-2ubuntu2~19.10
WebStart package: icedtea-netx:amd64-1.8-0ubuntu8
Java ATK Wrapper package: libatk-wrapper-java:all-0.35.0-3
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
VM arguments: [--add-reads=java.base=ALL-UNNAMED,java.desktop, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,jdk.jsobject, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, -Dicedtea-web.bin.name=javaws, -Dicedtea-web.bin.location=/usr/lib/icedtea-web/bin/javaws]
Dataset consistency test: No problems found

Plugins:
+ measurement (35405)
+ utilsplugin2 (35487)
}}}
"	defect	closed	normal	20.08	Core		fixed	template_report relation editor connectivity dual	matthijs
