-
Notifications
You must be signed in to change notification settings - Fork 785
Add vignette as attribute #5596
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
base: master
Are you sure you want to change the base?
Add vignette as attribute #5596
Conversation
Signed-off-by: Rahul Krishna Enishetty <[email protected]>
Signed-off-by: Rahul Krishna Enishetty <[email protected]>
Signed-off-by: Rahul Krishna Enishetty <[email protected]>
nilsnolde
left a comment
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.
we'd like to keep the extra bit out of directededge.h and rather put it in access restrictions.
| uint64_t lit_ : 1; // Is the edge lit? | ||
| uint64_t dest_only_hgv_ : 1; // destonly for HGV specifically | ||
| uint64_t spare4_ : 3; | ||
| uint64_t vignette_ : 1; // Edge is part of a road requiring a vignette |
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.
we discussed this briefly internally: we'd be happier to not "waste" bits here for smth that's not in OSM. can you put this into baldr/accessrestrictions.h/cc?
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.
Ok I will make the necessary changes as suggested.
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.
Be aware that using access restrictions for determining edge cost is not currently implemented. I'm sure it's possible, but it would require a bit of a refactor to avoid evaluating the restrictions twice.
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.
Moving this to the access_restrictions got me thinking about our initial problem where we want to avoid vignettes on a country level. Maybe we can do something like we have with the hight restrictions where the access restriction vignette has a value of the country it is in:

(Doesnt need to be a string maybe there is a int to country code mapping somewhere)
That way we can pass a list of countrys we want to avoid vignettes in and if the input is for example "all" we avoid it everywhere.
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.
That sounds reasonable. We could store the index into the tile's admin info, which fits into 12 bits. Then we'd even have 52 bits left for more information in the future (not sure what that would be, but maybe there are countries with more than one vignette type, e.g. if highways are operated by different private companies).
|
Hallo @nilsnolde and @chrstnbwnkl , @enishettyrahul has made the necessary changes to enable the use of vignette in accessrestrictions.cc. We have currently tested the CH exclusions in a map, and the Gurka test also works fine. We added some gurka tests for this, could you please help us to understand the issue in the code? |
Add vignette as edge attribute.
#fixes #5496
What issue is this PR targeting? If there is no issue that addresses the problem, please open a corresponding issue and link it here.
This to differentiate between toll and vignette costing.
Tasklist
Rahul Krishna Enishetty [email protected], Mercedes-Benz Tech Innovation GmbH
Provider Information
Licensed under MIT