-
Notifications
You must be signed in to change notification settings - Fork 85
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
lighweight highway merging rules #1542
Conversation
Werid behavior:
|
@kianzarrin did you test this? After reading the code I doubt it does anything when "new highway rules" is enabled and may apply changes to non-highway roads too if somehow works. |
@krzychu124 its draft. did you read description? |
I did not ask for review on this on the description said this is not ready. |
This reverts commit 4ca7deb.
|
} | ||
} | ||
|
||
if (numOutgoingSegments == 1 && numIncomingSegents == 2 && !laneSwitching && highwayOnly) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, so it's no longer restricted to one-way roads like legacy (line 552-553 below)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is actually a very interesting point. What should we do in case of 2 way highways like the highway over wall collection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
practically numOutgoingSegments == 1 && numIncomingSegents == 2
only works for oneway (unless if you really try to break it but even then lane arithmetic won't add up).
I will add condition for oneway to clarify/full-proof the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK now I only check for oneway highways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created #1561
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing feature
Is there any easy way to graphically render incoming and outgoing lanes as a single curve? There should be a way, like build a bezier from center of incoming to center of outgoing using node as a bezier pivot. Or even from last 75% of incoming to first 25% of outgoing.
@aubergine10 @krzychu124 I hope you didn't forget about this. I have addressed the issues you raised. |
@aubergine10 have your concerns been addressed? |
@kianzarrin I'll be testing this later today. |
@aubergine10 can I merge this? (you have requested changes). |
fixes #1530 . see issue for details.
ATTENTION: Only applies to highway on-ramps(merging) where lane arithmetic works (incoming= outgoing).
bonus: I also modified optimized the way global options variables are accessed. to speed up value access I cache the delegate. this reduces one if condition to check null.
latest branch build: TMPE.zip
tests:
test condition: according to #1530.
backward compatibility: