pass flags into process_segment#6658
Conversation
mjjbell
left a comment
There was a problem hiding this comment.
I'm not quite sure how to write an automated test for this. Maybe a profile that uses the flags information in a cucumber test?
Yes, take a look at https://github.com/Project-OSRM/osrm-backend/blob/master/features/options/extract/lua.feature and https://github.com/Project-OSRM/osrm-backend/blob/master/features/options/extract/turn_function.feature.
You could write a test that uses the flags within the profile's process_segment function and confirm you get the expected result.
527f823 to
b208aa8
Compare
|
I'm having some trouble getting the Cucumber tests running to finish this, which seems to have to do the node OSRM library. It looks like it's trying to find it locally, failing, and then trying to grab it from github, which fails as well since it's a non-release version. Do I need to do something to build the Node.js bindings locally? |
|
Okay, I figured out the Cucumber tests and added a test that confirms that segment flags get passed through to |
mjjbell
left a comment
There was a problem hiding this comment.
LGTM. Please add a changelog entry.
Co-authored-by: Michael Bell <[email protected]>
7953b62 to
64b6635
Compare
|
@mjjbell I added the changelog entry and rebased to avoid merge conflicts in changelog. Thanks! |
Windows build error
* pass flags into process_segment --------- Co-authored-by: Michael Bell <[email protected]>
Issue
This partially addresses #6145, by making the extractor edge flags available to
process_segmentassegment.flags. This allows accessing road classification, start point, etc. inprocess_segment. I'm using it by tagging bridges/tunnels as non-startpoints and then not applying elevation weighting to them since they are flat (ish) where I am but often cross deep valleys.I'm not quite sure how to write an automated test for this. Maybe a profile that uses the flags information in a cucumber test?
Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?