Skip to content

barrier parser - #2901

Open
karussell wants to merge 1 commit into
masterfrom
barrier_parser
Open

karussell wants to merge 1 commit into
masterfrom
barrier_parser

Conversation

@karussell

@karussell karussell commented Nov 1, 2023 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

otbutz commented Nov 2, 2023

Copy link
Copy Markdown
Contributor

barrier=cycle_barrier might be useful for bike routing.

@GeoffreyFardeau

Copy link
Copy Markdown

Up

This looks great! It would be very useful to have this merged into master so we can start making use of the barrier encoded value in our custom models and routing logic. Thanks for the work on this!

This branch was previously deployed

1 inactive deployment
benchmarks — f5c5d6ff Deployed Nov 1, 2023 by karussell
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.

4 participants