Skip to content

Bike: priority "multiplier" instead of "set" for lane - #3349

Merged
karussell merged 3 commits into
masterfrom
bike_lane_multiplier
May 12, 2026
Merged

karussell merged 3 commits into
masterfrom
bike_lane_multiplier

Conversation

@karussell

@karussell karussell commented Apr 30, 2026 •

Copy link
Copy Markdown
Member

This PR boosts the priority for "lane" slightly (and removes the cycleway=track inconsistency and the speed-compensation block) and fixes the inconsistencies discussed in #3219 (and does this for all bike classes) but without removing preferHighwayTags (would lead to unrelated changes for routes like this). The maximum priority is 1.2 (PREFER) i.e. it can never get as good as cycleway=track. This leads to fewer route changes compared to #3336 (draft) and #3327.

Also the the original route is fixed and now follows the initial laned residential:

image

I also deleted the speed-compensate block as @michaz said - it makes the priority calculation unnecessary complex.

AI generated summary table:

Original issue

Tags Before After
highway=residential 1.2 1.1
highway=residential + cycleway=lane 1.1 X 1.2
highway=residential + cycleway=track 1.2 1.3
highway=cycleway 1.3 1.3

Hierarchy preservation

Tags Before After
highway=tertiary (not in preferHwy) 1.0 1.0
highway=residential 1.2 1.1
highway=residential + cycleway=lane 1.1 X 1.2
highway=secondary 0.8 0.8
highway=secondary + cycleway=lane 1.1 X 0.9
highway=primary 0.5 0.5
highway=primary + cycleway=lane 1.1 X 0.6
highway=primary + cycleway=track 1.2 1.3
highway=secondary + cycleway=track 1.2 1.3

maxspeed≤30 (now "1.1 like residential")

Tags Before After
highway=secondary + maxspeed=30 1.2 1.1
highway=secondary + maxspeed=30 + cycleway=lane 1.1 X 1.2
highway=primary + maxspeed=30 1.2 1.1

Speed-compensation block removed

Tags Before After
highway=secondary + maxspeed=10 1.3 1.1
highway=residential + maxspeed=15 1.3 1.1
residential + bicycle=designated + class:bicycle:touring=2 + maxspeed=15 1.5 1.3

bikeDesignated no longer downgraded by cycleway=track

Tags Before After
highway=path + bicycle=designated (good surface) 1.3 1.3
highway=path + bicycle=designated + cycleway=track 1.2 X 1.3

@ratrun ratrun left a comment

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.

Thank you! This looks better compared to my draft #3336. I played around with it and also tested the case #597 , which lead to the introduction of the speed-compensate block.

@karussell karussell added this to the 12.0 milestone May 12, 2026
@karussell
karussell merged commit af47701 into master May 12, 2026
4 checks passed
@karussell
karussell deleted the bike_lane_multiplier branch May 12, 2026 17:01

This branch was previously deployed

1 inactive deployment
benchmarks — f4bfb6a2 Deployed May 11, 2026 by karussell via trigger_measurement #2459
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.

2 participants