Skip to content

make absolute barriers passable#2345

Merged
karussell merged 2 commits intomasterfrom
issue_2344
Jun 24, 2021
Merged

make absolute barriers passable#2345
karussell merged 2 commits intomasterfrom
issue_2344

Conversation

@karussell
Copy link
Copy Markdown
Member

Replaces #2344

  • make absolute barriers passable (now called blockByDefaultBarriers)
  • car now also allows passing "potential barriers" by default (those barriers are now called passByDefaultBarriers)
  • removal of configuration option "blockByDefault".

ratrun and others added 2 commits June 17, 2021 17:30
…ntialBarriers with passByDefaultBarriers as result of #2340.

Removal of configure option "blockByDefault".
final String customCar = "custom_car";
final String emptyCar = "empty_car";
CustomModel customModel = new CustomModel();
customModel.addToSpeed(Statement.If("road_class == TERTIARY", Statement.Op.MULTIPLY, 0.1));
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.

the problem is now that previously barriers hindered using the track and when we avoid tertiary roads by so much it is forced into using tracks. In general we should think about having a bit slower speed on tracks for car, but this is for another issue.

<tag k="name" v="Wiesbaden-Naurod"/>
</node>
<node id="20" lat="52" lon="9.4" version="1">
<tag k="barrier" v="gate"/>
Copy link
Copy Markdown
Member Author

@karussell karussell Jun 19, 2021

Choose a reason for hiding this comment

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

gate is passable by default now, so we either need a blockByDefaultBarrier or an additional access tag

passByDefaultBarriers.add("kissing_gate");
passByDefaultBarriers.add("swing_gate");
passByDefaultBarriers.add("cattle_grid");
passByDefaultBarriers.add("chain");
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.

Not sure if kissing_gate and chain should be really pass by default.

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.

Here I was wondering as well, but I didn't want to mix changes.

Copy link
Copy Markdown
Member Author

@karussell karussell Jun 21, 2021

Choose a reason for hiding this comment

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

Ok, let's do this in a separate PR. Do you think the other changes look fine?

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.

There is a similar case for the stile and turn_stile barrier, which should be moved in a seperate PR. Besides that it looks fine to me now.

// respect one way!
// http://localhost:8989/?point=55.819066%2C37.596374&point=55.818898%2C37.59661
queries.add(new Query(55.819066, 37.596374, 55.818898, 37.59661, 1114, 23));
queries.add(new Query(55.818702, 37.595564, 55.818536, 37.595848, 1114, 23));
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.

I needed to move the coordinates (so that they snap differently) as some nearby roads are now accessible due to open barriers

@karussell karussell added this to the 4.0 milestone Jun 19, 2021
@boldtrn
Copy link
Copy Markdown
Member

boldtrn commented Jun 21, 2021

Isn't this a breaking change, as it removes the option to block by default and only allow access if explicitly allowed. Might be worthwhile to add this to the changelog?

@karussell
Copy link
Copy Markdown
Member Author

as it removes the option to block by default

This feature is not removed and can be controlled via a list of tags (that subclasses can use).

@boldtrn
Copy link
Copy Markdown
Member

boldtrn commented Jun 21, 2021

Thanks for the clarification, yes you are right. So now a fence with motorcar=yes would be also accepted in the routing. I thought these tags would be still these "absolute barriers" that just block access.

@karussell
Copy link
Copy Markdown
Member Author

So now a fence with motorcar=yes would be also accepted in the routing.

Yes, exactly. So IMO an improvement probably also for other cases.

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