Skip to content
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

osrm-extract --parse-conditional-restrictions=0 flag still generates restrictions #4620

Closed
mloskot opened this issue Oct 17, 2017 · 2 comments
Assignees

Comments

@mloskot
Copy link
Member

mloskot commented Oct 17, 2017

I'm using OSRM 5.12.0

In #3841 (comment) I asked for clarification about relation between extract and contract steps, and requirement of GeoJSON file with timezones.

@karenzshea explained in #3841 (comment) the GeoJSON file is optional and it is required only if .osrm.restrictions file is present.
Then, to disable the conditional turn restriction application by running osrm-extract with --parse-conditional-restrictions option.

There are a few issues:

  1. GeoJSON file is not really optional. It is required indirectly though, by presence of some intermediate file, which is required by default now.

  2. AFAICT, use of the suggested option has no effect and .osrm.restrictions file is still generated that makes the contraction step require GeoJSON file with timezones.

  3. The suggested alternative solution by removing the .osrm.restrictions file is not a solution, but a hack, especially from OSRM API usage point, not really helpful..

  4. Apparently, --parse-conditional-restrictions controls corresponding flag in ExtractorConfig:

osrm::ExtractorConfig config;
config.parse_conditionals = false;
...
osrm::extract(config);

and, obviously, that does not have any effect either, as in 2.

Any chance to get that situation clarified?

@karenzshea karenzshea self-assigned this Oct 18, 2017
@karenzshea
Copy link
Contributor

I revisited the code handling conditional restrictions and sorry for being misleading in my hasty previous answer.

Thanks for catching that conditional restriction handling is not disabled by default in the extract and contract configurations.

Can you try using the changes in this branch https://github.com/Project-OSRM/osrm-backend/tree/conditionals/disable and let me know if it yields expected behaviour? I've disabled the relevant options by default, and also (bonus) made the .osrm.restrictions file optional as I'd previously thought.

@mloskot
Copy link
Member Author

mloskot commented Oct 18, 2017

Yes, as explained in the bunch of inline comments to the 5dfb1cb commit, setting valid_now=0 by default does the trick. The other changes, without valid_now=0 have no effect, AFAICT.

Thank you for looking at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants