Skip to content

Fix/issue 3135 ambiguous forks#3271

Open
modhtom wants to merge 2 commits intographhopper:masterfrom
modhtom:fix/issue-3135-ambiguous-forks
Open

Fix/issue 3135 ambiguous forks#3271
modhtom wants to merge 2 commits intographhopper:masterfrom
modhtom:fix/issue-3135-ambiguous-forks

Conversation

@modhtom
Copy link
Copy Markdown
Contributor

@modhtom modhtom commented Jan 22, 2026

Fixes issue #3135 where necessary "Keep Left" or "Keep Right" instructions were ignored on motorways when the road class and name remained constant.
Previously InstructionsFromEdges would aggressively Ignore instructions if roadClass == prevRoadClass.

I modified the suppression logic in getTurn():
The new check is applied only to MOTORWAY and TRUNK. All other road classes retain the original behavior.
For motorways/trunks, we now check the angle of the alternative path.
If the link peels off sharply (effectiveOtherDelta > 0.22), we assume it is visually obvious and return Instruction.IGNORE.
If the link angle is shallow (<= 0.22), we skip the ignore command, this allows the subsequent logic to generate the necessary "Keep Left/Right" instruction.

Verified at the reported location (A 565) and the A9 example. Both now correctly generate "Keep Right" / "Keep Left" instructions.
Image
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants