﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6732	Sorting destroys working route-relation	http://www.openstreetmap.org/user/Tirkon	http://www.openstreetmap.org/user/Tirkon	"I created a new public transport route relation ID 1727183 which is at present closed so far. As soon as I use the sorting function, it is not closed any more. Further another sortings do not help to reestablish an order which is closed. Another relation ID 1727194 represents the same route with mixed up members direction. If I click !ONLY ONCE! the sorting icon, then it is in a closed order. 

As long as there are some members missing in this relation you have to sort it by hand, because the sorting function is not able to find an order which is nearly similar to that, what it should be. Everybody who ever sorted a long route relation like this by hand, knows how hard it is. Sadly the order of routes is damaged by Potlatch users, because it does not offer a view to the direction of the members. Thus JOSM users have to repair this. And thus I tried to find out which part of the relation caused this issue.

The result can be found in relation ID 1726700 which is short and reduced to the problem. You can use the sorting function and observe how it reacts in order to find out and fix the problem. It is clear to me that there are two possibilities to ""drive"" through the circle. But the sorting function should at least find one of them. Taking in account, that most countries have right-hand traffic, it could possibly prefer an anti-clockwise direction which would make the result unique. 

This example shows that this uniqueness is important, because there is not only one loop which the bus has to pass. I know that there is at least a third loop in the route, which is not mapped so far. Such loops become quite common in public transport in order to save children from waiting at a high traffic mainstreet. This uniqueness provides, that the sorting function will find at least one solution with a closed way, which is not the case at the moment."	defect	closed	normal		Core	latest	needinfo	destroy relation route	
