-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Crosswalk naming #6918
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
Crosswalk naming #6918
Conversation
…wed by same street.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6918 +/- ##
=============================================
+ Coverage 72.18% 72.20% +0.01%
- Complexity 19838 19895 +57
=============================================
Files 2155 2161 +6
Lines 80048 80185 +137
Branches 8082 8104 +22
=============================================
+ Hits 57786 57896 +110
- Misses 19415 19430 +15
- Partials 2847 2859 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
We are getting there. I took the liberty to not use to many static methods: ibi-group@ee9d9bb If you agree with this, can you cherry-pick it into this branch. Also, there are conflicts now. |
Good idea! |
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.
Good job refactoring and extracting stuff out of classes. Recently I looked at similar OsmEntity way logic related to levels and it was really confusing. Can there be a good reason that an EdgeNamer can have OsmEntity way as parameter or should they always be OsmWay way? I think this should be changed if possible.
| public I18NString name(OsmEntity way) { | ||
| return way.getAssumedName(); | ||
| } |
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.
If this is really a way, we should use the OsmWay type. If it has to be an OsmEntity there might be a logic error somewhere because relations and nodes can also be given as parameter in theory.
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 also personally prefer OsmWay and I also got confused because a lot of way/edge code is in OsmEntity. Does a StreetEdge always come from an OsmWay? Happy to discuss how to proceed in an upcoming call.
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 think another option is to maybe do it in a separate PR. Lets discuss in Thursday's meeting to decide how to proceed
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 a PR for this: #6989. It changes the type from OsmEntity to OsmWay in recordEdges. Would you like to merge this first, or my PR first?
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.
Whichever one is ready first!
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.
Lets merge this one first
...cation/src/main/java/org/opentripplanner/graph_builder/module/osm/naming/CrosswalkNamer.java
Show resolved
Hide resolved
|
I merged this one so that merge conflicts can be avoided and that I can merge these changes into #6989. |
Summary
This PR adds a
CrosswalkNamerclass to assign names to crosswalks, such as "crossingcrosswalk over 10th Street" (see screenshot), so that they have better names than just "path" for turn-by-turn directions. As of writing, only crosswalks that have 3 or more nodes in OSM and a shared node with a street are covered. The PR also apply the crosswalk name to short sidewalk segments if they are the only adjacent way at either end of the crosswalk.The
CrosswalkNameris copied over from fromSidewalkNamer(both classes refactored for common logic), and a few supporting helper methods are added toOsmWayfor determining footways and adjacent ways.Screenshot:

Issue
Closes #6864
Things to discuss/resolve
turn:lanesattributeUnit tests
Unit tests are added for the process for finding and applying names to various types of crosswalks (over a named street, over a service road, over a turn lane).
Documentation
Added.
Bumping the serialization version id
Not necessary, I think