Repository navigation
More turn instructions - #790
don-philipe wants to merge 1 commit into
Conversation
|
Thanks!
'More instructions' are not necessarily better, what exactly does it change? And does it change the performances of calculating the instructions?
As this improves turn instructions I would like to have a test added which shows this. |
Indeed, now regardless name change we have a new instruction? Also "continue" instruction seems producing the same way? |
|
@don-philipe would you mind to explain the changes a bit? (plus see my questions) |
|
Sorry for the delay, was very busy the last weeks.
I implemented this feature mainly addressing routing for blind persons. They need the information about direction changes even if the OSM-Tags don't change. In #94 someone suggested that this feature should be optional (only for certain routing profiles?).
The changes in the Path class affect the decision about the instruction generation. In the original code instruction where only generated when name or annotation of an edge changed (plus first instruction and roundabout instructions). With my changes the last "else if" branch is transformed into an "else" branch. Now an instruction is produced with every new edge. At the end of this branch another "if" decides whether to accept this instruction or not. This was neccessary because the direction calculation is done in this branch. Instructions are now accepted if the edge name or annotation changes (as in previous version) or if the direction is not "continue".
I haven't done measures regarding perfomance. But as explained above, there is more calculation do to now (at least one calculation for every edge). |
Ah, okay. This would make sense. But as it is now it is not mergable. Maybe you or someone else has tome for this :) ? |
With some little changes in the
Pathclass, now more turn instructions are available. Now only thecontinueinstruction on a road whose name don't change is omitted. See also #94.Had to adjust several tests. I hope this is sufficient for testing this feature.