Skip to content

Render oneway:bicycle=-1 and the footway side of segregated paths - #733

Open
AndreasGerken wants to merge 2 commits into
cyclosm:masterfrom
AndreasGerken:oneway-bicycle-reverse
Open

AndreasGerken wants to merge 2 commits into
cyclosm:masterfrom
AndreasGerken:oneway-bicycle-reverse

Conversation

@AndreasGerken

@AndreasGerken AndreasGerken commented Nov 14, 2026 •

Copy link
Copy Markdown

Fixes #697.

What changes

  1. Arrow direction. The one-way arrow followed only oneway, so a way with oneway:bicycle=-1 got an arrow along its drawing direction, against the direction bicycles may ride. The arrow now follows oneway:bicycle when it is yes or -1, and oneway otherwise. This applies to paths, cycleways, footways and roads, including the bicycle=designated road arrows.
  2. Tracks. highway=track with oneway:bicycle=yes/-1 now gets arrows, like path/cycleway/footway (example from the issue: way 27582403).
  3. Footway side of segregated paths. The footway line of highway=path + bicycle=designated + segregated=yes was always drawn on the right of the drawing direction. It is now drawn on the right of the riding direction, so it moves to the other side together with the arrow for oneway:bicycle=-1.
  4. Explicit footway side. If a way has traffic_mode:left=foot or traffic_mode:right=foot, the footway is drawn on that side. Left and right are read as in Proposal:Separation (draft, where traffic_mode:* is defined): relative to the riding direction on one-way paths, and relative to the drawing direction on two-way paths. This covers footways that really are on the left of the riding direction, e.g. at bus stops or in countries that drive on the left. The ways in the issue (Wrocław, ul. Bolesława Krzywoustego) can then drop the note and be tagged traffic_mode:left=foot.

Deployment

views.sql adds a footway_side column to cyclosm_ways, so existing databases need views.sql run once (no reimport).

Note on labels.mss

In the arrow block, the light #ddf fill for cycleway/path is repeated inside the reverse rule. Without it, carto drops either the fill or the reverse direction for oneway=yes + oneway:bicycle=-1 on paths and cycleways (checked in the compiled XML), so please keep it when touching this block.

Testing

  • Compiled with carto 1.2.0: same warnings as master except twelve new "line-offset is unstable" warnings (already common in roads.mss).
  • I checked the compiled Mapnik XML for every tag combination: 126 for the arrows (direction and fill) and 162 for the footway line (side and offset).
  • I rendered real tiles with the docker static pipeline, master vs. this branch, on OSM data from November 2026:

Berlin, Grüner Weg. (way 1570439660) The separately mapped path is tagged partly oneway:bicycle=yes and partly -1. On master the arrows and the footway line flip back and forth along one continuous path; with this PR they are consistent:

gruener_weg_before_after

Wrocław, ul. Bolesława Krzywoustego (the ways from the issue, for example way 626720873). Panels: master; this PR without a side tag; this PR with traffic_mode:left=foot (added locally for the test). The walkway is actually on the left of the riding direction (towards the road), so the last panel is correct. To show it like that, the ways would need traffic_mode:left=foot in OSM (the note could then go):

wroclaw_krzywoustego_side_by_side

Berlin, Messedamm (way 41107193, oneway:bicycle=yes, traffic_mode:left=foot):

berlin_messedamm_traffic_mode_left

Berlin, Rudower Chaussee (way 1172671353, oneway:bicycle=-1)

rudower_chaussee_before_after

The correctness of these examples was manually reviewed using orthophotos.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

- One-way arrows follow oneway:bicycle when bicycles have their own
  direction: oneway:bicycle=-1 now points against the way's drawing
  direction, also on roads with oneway=yes and on bicycle=designated
  roads.
- highway=track with oneway:bicycle=yes/-1 gets arrows.
- The footway line of segregated paths (highway=path +
  bicycle=designated + segregated=yes) is drawn on the right of the
  riding direction, so it moves with oneway:bicycle=-1.
- traffic_mode:left=foot / traffic_mode:right=foot set the footway side
  explicitly (new footway_side column in cyclosm_ways). Left and right
  follow the riding direction on one-way paths and the drawing
  direction on two-way paths, as defined in Proposal:Separation:
  https://wiki.openstreetmap.org/wiki/Proposal:Separation#Directions_of_left_and_right

Existing databases need views.sql re-run once (no reimport).

Fixes cyclosm#697

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Phyks Phyks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey!

Thanks for this MR. I have a blocking comment on footway_side. Could you update the MR and I'll quickly review the rest, which should only have minor / style comments, if any?

Thanks!

Comment thread views.sql Resolved
Comment thread roads.mss Resolved
traffic_mode:left/right comes from Proposal:Separation, which is still a
draft, and is used on only about 2k ways. Remove the footway_side column
and its rules. The footway of segregated paths stays on the right of the
riding direction, so it still moves with oneway:bicycle=-1.

views.sql and project.mml are back to master, so no database update is
needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Add support for oneway:bicycle=-1

2 participants