Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Start calculating Movements and Conflicts #96
Start calculating Movements and Conflicts #96
Changes from all commits
e7919f6
b5110af
fcdb296
76d32e0
fa037f3
93742f4
670a890
b8b9f21
aee6298
01347e6
d872777
b75b2f2
156c79a
eaf8713
1502ce8
e9cbad0
86432b4
e58eaa9
2c13409
24845f3
ad8e7e8
d46babd
427aaea
479d636
19ab938
34eecc2
1bca406
beca662
05def90
ffe0e9d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 wanted to implement a method on
Road
that could calculate these offset endpoints (for a given end and direction). Because aRoad
doesn't know it's ownDrivingSide
or dividing line (!!), it's non-trivial, so I'm happy with this currently.I want to figure out how a
Road
should figure out it's own driving side, dividing line andHalfRoad
s pretty soon. Maybe annotating contraflow lanes withinLaneSpec
would make it easy enough to calculate on demand fromlanes_lrt
, or maybe the driving side and dividing lane should be stored on theRoad
as part of the OSM parsing process (where we have the most context).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 agree it's annoying how often
DrivingSide
has to be plumbed around. Just so I understand, by diving line, you mean the point where the direction of travel changes (or the left/right edge on one-way roads)? Looking at pairs oflanes_ltr
and direction should work for that, right? And that process exposes cases where there isn't one obvious dividing lane (bidi cycletracks, shared center turn lanes)What do you mean by this? They have
Direction
alreadyThere 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.
Yes, that is what I mean by "dividing line". If contraflow lanes were annotated as "contraflow" from the beginning, then we wouldn't get confused when trying to find the dividing line. Knowing the driving side might be enough to come up with a consistent definition / detection algorithm though.
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'm open to trying either way. This is sounding like a good thing to unit test individually -- it's probably just a few weird edge cases I'm worrying about