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.
TestUnroutable
test thehighway=construction
tag(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#getPermissionsForEntity
method might return notNONE
even if the input parameterStreetTraversalPermission def
isNONE
. 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: