Skip to content

increase matchScore for non-link highway= with _link variant#2200

Open
matkoniecz wants to merge 1 commit intomainfrom
matkoniecz-patch-13
Open

increase matchScore for non-link highway= with _link variant#2200
matkoniecz wants to merge 1 commit intomainfrom
matkoniecz-patch-13

Conversation

@matkoniecz
Copy link
Copy Markdown
Collaborator

@matkoniecz matkoniecz commented Apr 20, 2026

expected effects:

(1) when multiple primary objects are tagged highway=tertiary will now win (very unlikely but possible for road-running rails, even less likely for waterways) - should be harmless

(2) when searching for roads it may be now listed higher above not really related road types (what appears when you search "road")

(3) when searching for roads with "tertiary" it will be listed above tertiary_link - whole point of this change

it works, so I extended it to other road types

main bad effect is that some people adjusted to the current bad order

was featured in https://community.openstreetmap.org/t/id-tagging-schema-improvements-which-would-be-especially-worth-doing-which-should-be-avoided/138538

Description, Motivation & Context

Related issues

fixes #1638

Links and data

Relevant OSM Wiki links:

Relevant tag usage stats:

Checklist and Test-Documentation Template

Read on to get your PR merged faster…

Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.

This is how it works:

  1. After you submit your PR, the system will create a preview and comment on your PR:

    🍱 Your pull request preview is ready.
    If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

  2. Once the preview is ready, use it to test your changes.

  3. Now copy the snippet below into a new comment and fill out the blanks.

  4. Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/openstreetmap/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

@github-actions
Copy link
Copy Markdown

🍱 Your pull request preview is ready

Please use this preview to check your changes. Ideally use the test documentation template and document your test results by commenting on the PR. This will speed up the review process for everyone.

FYI, once this PR is merged, you can use the iD Editor Preview to test your changes in interaction with all other changes.

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

currently:

screen-2026-04-20-15-01-44

so main side effect would be moving highway=construction highway=track highway=road below trunk/primary/secondary/tertiary entries...

I think it would be acceptable.

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

highway=tertiary
waterway=stream
highway=tertiary
railway=rail

appears as road anyway (first with oneway indicators) anyway, and is likely bad tagging so such PR would not change things

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

here changing order may be more impactful, but it feels a bit unusual things to search form? So also should be fine I guess?

screen-2026-04-20-15-13-01

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

and here you have THE intended outcome

screen-2026-04-20-15-14-07

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

I think it overall works, I will boost also other roads with link variants

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

And yes, such tweaking feels like !important in CSS and has risk of cascading adjustments. But I do not really see a better way, though if we get horrible cascade of adjustments something can be invented.

specifically for ones with _link variant

fixes #1638
@matkoniecz matkoniecz force-pushed the matkoniecz-patch-13 branch from 5465930 to 09d8b9e Compare April 20, 2026 13:29
@matkoniecz matkoniecz changed the title increase matchScore for highway=tertiary [an experimental draft] increase matchScore for non-link highway= with _link variant Apr 20, 2026
@matkoniecz matkoniecz marked this pull request as ready for review April 20, 2026 13:32
@matkoniecz
Copy link
Copy Markdown
Collaborator Author

after: street works better than expected

hmm, maybe expressway should also list link variants?

screen-2026-04-20-16-23-03 screen-2026-04-20-16-22-55 screen-2026-04-20-16-22-48 screen-2026-04-20-16-22-39 screen-2026-04-20-16-22-29 screen-2026-04-20-16-22-03 screen-2026-04-20-16-21-12 screen-2026-04-20-16-20-35 screen-2026-04-20-16-19-50

@matkoniecz
Copy link
Copy Markdown
Collaborator Author

Overall I am happy about it

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.

Prioritize road over link presets

1 participant