Skip to content

Store toll information via DataFlagEncoder - #1033

Closed
boldtrn wants to merge 2 commits into
graphhopper:masterfrom
boldtrn:issue_643
Closed

boldtrn wants to merge 2 commits into
graphhopper:masterfrom
boldtrn:issue_643

Conversation

@boldtrn

@boldtrn boldtrn commented Apr 21, 2017 •

Copy link
Copy Markdown
Member

This PR allows to store toll information in the graph. And avoiding toll roads in the GenericWeighting. It is intended to fix #643.

In this PR I only evaluate ways for the property toll=yes. It seems that other also check if there is a barrier=toll_booth.

I tried integrating toll booths as well, but I am not sure if the overhead of implementing/maintaining it is worth the benefit? I looked up a couple of toll roads and it seems like all where tagged correct, so toll booth recognition might not be required? I created an overpass-turbo query to find toll_booths that are not on a way with "toll" tagged, but I couldn't find one.

The overpass query looks like this:

[bbox:{{bbox}}];
way[!"toll"];node["toll_booth"="yes"](w) -> .booth;
node.booth;
out;

BTW: I think the overpass query is correct, I tried it with traffic signals and get results:

[bbox:{{bbox}}];
way[!"toll"];node["highway"="traffic_signals"](w) -> .booth;
node.booth;
out;

I added the toll_booth code here, it's untested, but I assume it could work like that... Testing is not that trivial. I think I would end up extending the test-barriers.xml. Since I couldn't find a live example this might not be worth the effort.

@karussell

Copy link
Copy Markdown
Member

Thanks! Looks good.

Probably another issue. But now we are slowly getting another problem: The single purpose FlagEncoders are too limited and do not store much but have topic specific code. The DataFlagEncoder stores everything (or could) but also collects code of too many purposes with on&off switches. We need kind of a builder mechanism for the DataFlagEncoder

@boldtrn

boldtrn commented Apr 22, 2017

Copy link
Copy Markdown
Member Author

Thanks for having a look at this PR.

BTW: Do you have any opinion on the toll_booth part?

Probably another issue. But now we are slowly getting another problem: The single purpose FlagEncoders are too limited and do not store much but have topic specific code. The DataFlagEncoder stores everything (or could) but also collects code of too many purposes with on&off switches. We need kind of a builder mechanism for the DataFlagEncoder

Yes your are absolutely right. I wasn't even sure if should create this PR as it might get too crowded already. I created a separate issue to discuss this - #1036.

@karussell

Copy link
Copy Markdown
Member

BTW: Do you have any opinion on the toll_booth part?

You mean that we should detect if a network of roads is toll=yes if the entrance nodes have this toll_booth tag? This would be indeed better but complicated and different to how other restrictions work in GH. Also what if some entry nodes are not properly tagged - then the full network gets toll=yes

@boldtrn

boldtrn commented Apr 25, 2017

Copy link
Copy Markdown
Member Author

You mean that we should detect if a network of roads is toll=yes if the entrance nodes have this toll_booth tag?

My assumption was that there are probably incorrect tagged roads. So the ways don't contain toll=yes, but there are toll_boots. So I would have simply tagged the underlying way with toll=yes to make sure we tag the road as toll=yes (similar to our current barrier node approach). But I haven't found cases like this yet, see above overpass query.

@karussell karussell changed the title Store Toll Information for the DataFlagEncoder Store toll information via DataFlagEncoder Apr 25, 2017
@jitendra3109

Copy link
Copy Markdown

@boldtrn What is the status of the this PR?
Also there is some conflict in this PR.

@boldtrn

boldtrn commented Jun 26, 2017

Copy link
Copy Markdown
Member Author

@boldtrn What is the status of the this PR?

Well, it's essentially finished. Conflicts should be resolvable easily. I think we want to improve the DataFlagEncoder first, because it gets very crowded. The code should work though.

@karussell

karussell commented Jul 25, 2017 •

Copy link
Copy Markdown
Member

I think we want to improve the DataFlagEncoder first, because it gets very crowded

Let us merge this and 'fix' the DataFlagEncoder via replacing it with the EncodedValue work from #1112 later

@boldtrn

boldtrn commented Jul 25, 2017

Copy link
Copy Markdown
Member Author

Let us merge this and 'fix' the DataFlagEncoder via replacing it with the EncodedValue work from #1112 later

Sure makes sense. I can try to fix the conflicts in the next hours, but I am not sure if I can find the time. Can't promise to resolve the conflicts before Friday though. If you want to merge it now, would it be possible for you to resolve the conflicts? Otherwise I will do it until Friday.

@karussell

Copy link
Copy Markdown
Member

Closing for now. Will be easy to implement or recover after #1447 is merged.

@karussell karussell closed this Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants