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

barrier parser #2901

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

barrier parser #2901

wants to merge 1 commit into from

Conversation

karussell
Copy link
Member

@karussell karussell commented Nov 1, 2023

Add barrier to encoded_values:

  graph.encoded_values: barrier

Then you can use it in a custom_model and as path detail

See discussion.


@Override
public void handleWayTags(int edgeId, EdgeIntAccess edgeIntAccess, ReaderWay way, IntsRef relationFlags) {
if (way.hasTag("gh:barrier_edge")) return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be !way.hasTag(...)? The ways with the gh:barrier_edge are the ones we are interested it, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

if (!Helper.isEmpty(barrierStr)) {
Barrier curr = Barrier.find(barrierStr);
if (curr == Barrier.MISSING) {
if (barrierStr.equals("kissing_gate")) barrierVal = Barrier.GATE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These cases should be handled by Barrier.find(). We do something similar in Surface.find()

@otbutz
Copy link
Contributor

otbutz commented Nov 2, 2023

barrier=cycle_barrier might be useful for bike routing.

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

Successfully merging this pull request may close these issues.

None yet

3 participants