Add sidepath name fallback using is_sidepath:of:name and street:name tags
Issue
Fixes #7259
When sidewalks and cycleways are mapped as separate ways in OSM, they often lack a name tag. This results in unhelpful
navigation instructions like "Turn right, walk 150 m" instead of "Turn right onto Main Street, walk 150 m".
This PR adds support for fallback name tags that OSM mappers use to associate sidewalks with their adjacent streets:
is_sidepath:of:name(~15,500 uses in OSM)street:name(~9,100 uses in OSM)
The fallback only applies when:
- The way has no
nametag - The highway type is
footway,cycleway, orpath - The way is marked as a sidepath via
footway=sidewalk,cycleway=sidepath, oris_sidepath=yes
Car routing is unaffected because the fallback requires the highway type to be footway, cycleway, or path. Even if
someone mistakenly adds footway=sidewalk to a highway=primary, the fallback will not trigger since it checks the
highway type first.
Tests added
Foot profile (features/foot/sidepath_names.feature):
- Use
is_sidepath:of:namefor unnamed sidewalk - Use
street:namefor unnamed sidewalk is_sidepath:of:nametakes priority overstreet:name- Explicit
nametag takes priority over fallback - Use
is_sidepath=yeswithstreet:name - No fallback without sidepath marker
Bicycle profile (features/bicycle/sidepath_names.feature):
- Use
is_sidepath:of:namefor cycleway sidepath - Use
street:namefor cycleway sidepath - Explicit name takes priority
- Use
is_sidepath=yeswithis_sidepath:of:name - No fallback without sidepath marker
Car profile (features/car/sidepath_names.feature):
- Does not use sidepath name fallback on roads
- Does not pick up
is_sidepath:of:nameon roads - Sidepath markers do not affect car roads
Tasklist
- [x] CHANGELOG.md entry (How to write a changelog entry)
- [x] update relevant Wiki pages (added "Way names" section to docs/profiles.md)
- [x] add tests (see testing documentation)
- [ ] review
- [ ] adjust for comments
Requirements / Relations
None