-
Notifications
You must be signed in to change notification settings - Fork 681
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
Exclude cash-only-tolls #3341
Exclude cash-only-tolls #3341
Conversation
can you say more about this:
looking at what you are trying to achieve i dont understand why this isnt sequestered to just nodes in the graph. surely toll collection only ever happens at a node. if osm supports tagging this on the way (i saw a tiny minority did), then i think we should either ignore it or try to mark the node at one end of the way as the collection point. in other words i dont understand why we need this on the directededge. to me it seems we can avoid cash only toll collection by disallowing costing to pass through a node with cash only collection and completely forget about marking the edges with this info. also i looked at your entry for taginfo and it doesnt seem to match what osm tagging exists. you mentioned it in your description and i see the parser code is correctly pulling out the payment tags but the taginfo entry is talking about our internal boolean that we make in lua not the actual tags from the osm wiki. you need to change the taginfo entry to have the tag |
@kevinkreiser I did some more digging. There appear to be very few ways tagged as Just out of interest I also dug into ways tagged as Point taken, I think it is safe to restrict this to nodes. |
@kevinkreiser Re taginfo, I'm still learning how to update it. |
taginfo.json
Outdated
{ | ||
"key": "payment:*", | ||
"object_types": [ | ||
"way", |
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 are ignoring it on the way for now right?
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.
oops, right
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.
looks good now.
!(exclude_cash_only_tolls_ && node->cash_only_toll())) || | ||
ignore_access_; |
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.
this doesnt look right, i think it should be:
return ((node->access() & access_mask_) || ignore_access_) &&
!(exclude_cash_only_tolls_ && node->cash_only_toll());
basically the ignoring access has to do with the access and the cash toll is a separate concern
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.
Issue
Support to avoid routing through/on cash-only tolls.
A new request parameter is added:
exclude_cash_only_tolls
.Tolls appear on nodes as
barrier=toll_booth
.There are 60 types of
payment
keys, e.g.,payment:coins
andpayment:credit_card
. There are only threepayment
keys that are cash:payment:cash
payment:coins
payment:notes
On a given tollednode there are frequently multiple
payment
keys specified, indicating the types of payment dis/allowed.This PR examines the types of payments on a tolled node and determines if the toll is cash-only. This detail is saved in the tile. At runtime we can then inspect/honor this detail in the
Allowed
methods.Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?