Skip to content

bike profiles: more consistent highway tag classification - #3251

Open
karussell wants to merge 2 commits into
masterfrom
bike_improve_misc_highway
Open

karussell wants to merge 2 commits into
masterfrom
bike_improve_misc_highway

Conversation

@karussell

@karussell karussell commented Dec 13, 2025 •

Copy link
Copy Markdown
Member

To reduce complexity for #3227 I moved one of the inconsistencies into a separate PR. /cc @ratrun.

In #3015 we reduced priority for tertiary. We should do this for unclassified too as it is very similar to tertiary.

Furthermore I suggest to remove tertiary&unclassified from preferred highways. They are just normal highways if they come without bike lane or "bike infrastructure". (IMO we should do the same for service&residential but let's do this later.)

For racingbike the state for residential&service is confusing in master: residential was in the "preferred tag" but also was avoided later on. I cleaned this up and put it just into avoidHighwayTags.

I also made the penalty for "tunnel" less severe.

@karussell karussell added this to the 12.0 milestone Dec 13, 2025
@karussell karussell changed the title bike: slightly more consistent highway tag classification bike profiles: slightly more consistent highway tag classification Dec 13, 2025
@karussell karussell changed the title bike profiles: slightly more consistent highway tag classification bike profiles: more consistent highway tag classification Dec 13, 2025

addPushingSection("path");

// preferHighwayTags.add("road");

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.

This looks like a temporary change. It should be removed.

@karussell karussell Feb 20, 2026 •

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.

Do you mean the code should be removed or the change should be reverted?

As I wrote in the PR:

I suggest to remove tertiary&unclassified from preferred highways.

Any reason why you would keep them preferred? (if you comment was about this)

The idea was to keep them neutral to reduce artifacts like in #3015. And preferring roads more based on bicycle infrastructure. Note that if there is a secondary vs. tertiary choice then still the tertiary will be picked because of the penalty for secondary.

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.

I'm fine with the changes. Please remove the currently commented code completely.

preferHighwayTags.add("road");
preferHighwayTags.add("track");
preferHighwayTags.add("path");

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.

This looks like a temporary change. It should be removed.

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.

Same here, please remove the commented code.

preferHighwayTags.add("tertiary_link");
preferHighwayTags.add("residential");

// preferHighwayTags.add("road");

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.

Removal of road is fine

preferHighwayTags.add("residential");

// preferHighwayTags.add("road");
// preferHighwayTags.add("unclassified");

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.

I think we should keep this preference for tertiary, tertiary_link and unclassified the racingbike profile.

osmWay.setTag("highway", "tertiary");
osmWay.setTag("maxspeed", "50");
assertPriorityAndSpeed(encodingManager, priorityEnc, speedEnc, parsers, PREFER, 24, osmWay);
assertPriorityAndSpeed(encodingManager, priorityEnc, speedEnc, parsers, UNCHANGED, 24, osmWay);

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.

See my comment in the code section. This should remain PREFER. The same applies for the other changes in this file as well. But the slight improvement for tunnel is OK.

This branch was previously deployed

1 inactive deployment
benchmarks — 582121ab Deployed Dec 17, 2025 by karussell
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