Skip to content

Add separate no-thru handling for bicycles#3410

Merged
gmellemstrand merged 5 commits into
opentripplanner:dev-2.xfrom
mfdz:bike-no-thru
Apr 29, 2021
Merged

Add separate no-thru handling for bicycles#3410
gmellemstrand merged 5 commits into
opentripplanner:dev-2.xfrom
mfdz:bike-no-thru

Conversation

@leonardehrenfried

Copy link
Copy Markdown
Member

Summary

Creates no-thru handling for bicycles separate from cars.

Issue

Closes #3396

Unit tests

I've added unit tests for both the car and the bicycle cases.

Code style

Documentation

It seems like and implementation detail. Should it be explicitly documented?

Changelog

@leonardehrenfried leonardehrenfried requested a review from a team April 9, 2021 12:23
@leonardehrenfried leonardehrenfried force-pushed the bike-no-thru branch 4 times, most recently from 6500e91 to ebd2c15 Compare April 9, 2021 12:47
@leonardehrenfried leonardehrenfried changed the title Bike no thru Add separate no-thru handling for bicycles Apr 13, 2021
|| "forestry".equals(access) || "agricultural".equals(access);
return noThruTraffic;
return "destination".equals(access) || "private".equals(access)
|| "customers".equals(access) || "delivery".equals(access);

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.

It does seem strange, but do you know why the "forestry" and "agricultural" tags where checked here?

@leonardehrenfried leonardehrenfried Apr 14, 2021

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.

We also thought that this is strange - if not a bug. In Germany at least forestry and agricultural roads are not no-thru by default. They may be closed to non-farming traffic but that's not what this piece of code did.

For that reason I removed it.

If no-thru really is specific to each country then we need move that into the way property set.

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.

It might be that it is there to avoid taking shortcuts through forestry and agricultural roads, even if it is technically allowed. We could talk about this on the next dev meeting, to get other people's input.

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.

Good idea.

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.

Handling of the tags was moved to WayPropertySetSource so that is may be modified as-needed, along with a mention of the changes to the mailing list.

@leonardehrenfried leonardehrenfried force-pushed the bike-no-thru branch 3 times, most recently from 87beecd to 03eca8f Compare April 14, 2021 10:30
@t2gran t2gran added this to the 2.1 milestone Apr 20, 2021
@gmellemstrand gmellemstrand merged commit efa9b60 into opentripplanner:dev-2.x Apr 29, 2021
@hbruch hbruch deleted the bike-no-thru branch July 28, 2024 08:35
@wolfbert

wolfbert commented May 9, 2026

Copy link
Copy Markdown

I've stumbled upon this while researching router handling of forestry roads, and yes, I realize the thread is old.

Just to clarify, forestry and agricultural in OSM are documented access tags . They mean, not surprisingly, "for the respective purpose only".

To allow for recreational cycling, tagging should be motor_vehicle=* (or, more clumsy, vehicle=* + bicycle=yes). Edit: There is in fact a semantic difference between the two (hint: hand_cart).

Under no circumstances should you route a recreational cyclist e.g. through vehicle=forestry, as a bicycle in OSM counts as a vehicle and this would not be a forestry purpose.

In Austria, this would also be in violation of federal law (and the traffic sign is tagged as vehicle=forestry).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No-through-traffic for bicycles

6 participants