-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Monitor] Inconsistent number of segments #431
Comments
The 114 segments in the map page reflect the situation as found in the route relation. The large amount of segments is mostly due to the wrong sorting order of the ways in the relation. The 7 segments in the detail page are the result of merging adjacent segments into bigger segments (called super segments in the code). This merging logic is normally only intended to be performed on all segments in nested routes (route relations with other route relations as members). The idea is that for example when a superroute consists of 5 subroutes that are together continuous, the superroute would show only 1 segment instead of 5. The inconsistency in number of segments can be avoided by not performing the merging logic on individual route relations, but only on the parents in nested route relations. Note: when sorting the route members in JOSM, this results in 5 segments. The the logic for merging the segments results in 7 segments and not JOSM's 5. This is because the logic assumes that the route starts at the first member in the relation (which is currently not the case). |
👍 But what happened when (the parent) route have mixed members (relations and ways) ? |
As for "super-segments", @pyrog and I have been giving some thoughts to the difficulties in deciding whether a discontinuity is legitimate or not. Roles assigned to sub-relations help sometimes, but not always:
We have come up with a candidate solution: we add nodes to the super-relation (possibly with a dedicated role) everywhere there is a connection or starting point expected. From this, you can use the same kind of logic as in node networks to determine whether things are OK or not. Your thoughts? |
I am currently rewriting the logic for the route analysis. Especially the node network route analysis will change to be much closer to how the monitor logic currently works and how JOSM looks at the route relations. There will be no more sorting of the relation members, the members will be interpreted in the order as found in the relation. During this rewrite the logic for route relations with nested route relations should also improve (proper handling of relations that mix ways and relations, member roles, etc), but I am currently not at that point in the code yet. When I get that far, it would be good to work from concrete example routes to find out where not enough information is available. |
I can suggest Voie de Tours, E2 and E5 as examples. There also are more complex situations mid-way between routes and networks in V22 (cycling route) and Sentier de Provence (Mines et Energie). |
On some routes, the number of segments displayed in the Details tab is much lower than the number displayed in the Map tab. See below:
The text was updated successfully, but these errors were encountered: