graphhopper / graphhopper/graphhopper

Instructions: Merge multiple close Continue Instructions

Open
#1,282 6 comments 1 reaction 1 assignee Claimed by @boldtrn View on GitHub
improvement
Dominant language
Java
Stars
6.7k
Forks
2k
Avg merge
15h 58m
Merged PRs (30d)
3

Description

Sometimes at more complicated intersections, there might be multiple continues close to each other (<50m apart). Creating multiple instructions does not really help the way finding, but is rather distracting IMHO.

Here is one [example](https://graphhopper.com/maps/?point=-33.788943%2C151.127254&point=-33.787342%2C151.125891&debug=true). Both continues on it's own are correct. But having them in this case, might not help.

Here are two more examples in Baden-Württemberg:
- https://graphhopper.com/maps/?point=49.134188%2C10.069313&point=49.134329%2C10.06382&debug=true
- https://graphhopper.com/maps/?point=49.005525%2C8.368433&point=49.004564%2C8.36633&debug=true

I propose to merge two successive continues if they are close (e.g. < 50m) and if they use the same street name. I have been at this intersection multiple times with the [Kurviger app](https://play.google.com/store/apps/details?id=gr.talent.kurviger.pro) and the two continues make it hard to understand that one has to turn right shortly afterwards.

![gh-continue](https://user-images.githubusercontent.com/1553525/36012391-e9857af4-0db1-11e8-87ec-2ed93e20c358.png)
![gh-continue-2](https://user-images.githubusercontent.com/1553525/36012404-fe58ccf6-0db1-11e8-8c5a-c6115fbfc074.png)

I created a PR for this #1284, but it became stale. One option to improve this issue would be to reduce continue instructions in general.

I think generally there are two cases:
- Cases where the client should merge or handle these instructions, like "turn left, then turn in 80m turn right". These would be actual individual turns.
- Cases where surrounding context around the instructions indicate that one instruction would be enough. I think a couple of close continue instructions are one of the best examples for this. But I think there are also other cases, for example two very close keep right instructions, could indicate, that a single keep right might be enough.

Related #1047

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.