Support OSM highway=razed tag - #2660
Merged
abyrd merged 2 commits intoDec 11, 2018
Merged
Conversation
Member
|
@t2gran the method you use here is the same way I've filtered out non-existing highways before, which don't belong in the graph at all. The WayPropertySet is more targeted at roads which will have different characteristics for different modes or directions. Point taken though that it's not obvious how the WayPropertySet works. I asked the people at TriMet who fine tuned this, and they gave me an explanation a while back (maybe on the OTP mailing list). We should move that into the official documentation - but that's a separate issue. |
abyrd
approved these changes
Nov 30, 2018
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TestUnroutabletest thehighway=constructiontag(equivalent tag in the same list). See more on this below below.Testing OSM filtering rules
The tag filtering logic happens in many places witch for me is very hard to understand. It needs refactoring, and a natural start to this, is to create a unit test with the contract/rules. But this is a big task. When I tried to fix this issue, I first added one line to the
DefaultWayPropertySetSource: (props.setProperties("highway=razed", StreetTraversalPermission.NONE);). This did not have the expected result. I debugged this until I understood that there is no clear precedence between the rules - at least for me to grasp in a few hours. TheOSMFilter#getPermissionsForEntitymethod might return notNONEeven if the input parameterStreetTraversalPermission defisNONE. This is just a small pice of the puzzle, so I went on and fixed it another way (see code).To be completed by @opentripplanner/plc: