This third and last part of my short series with discussions of recent changes of road rendering in the Alternative-Colors map style is an actual feature addition. I added rendering of highway=crossing.
highway=crossing currently is the most widely used primary tag not rendered by OSM-Carto with over 12M uses. It is used on nodes to indicate a location where a road is meant to be crossed or is actually commonly crossed by pedestrians.
There are a number of OpenStreetMap based map styles that display this tag in some form already. But most of them showing crossings like other points of interest with a blocking symbol (which practically often competes with other symbols, in particular traffic lights).

highway=crossing in OpenCycleMap/AJT-Style/OSMand
The most sophisticated rendering of highway=crossing in maps so far that i am aware of is in the French OSM-Carto fork. This uses non-blocking point symbols that are rotated according to the direction of the roads intersecting the crossing – unless the directions of these differ so much that it is deemed non-feasible to determine a single direction for the symbol – then a classical blocking point symbol is used. The rotated symbol is varied depending on supplemental tags.


Different rendering variants of highway=crossing in the French style depending on secondary tags. The second symbol in blue is the static, blocking variant
The rotated symbol has the advantage that it can be well used in a non-blocking fashion, that it is fairly intuitive in its meaning and how it relates to the roads and paths around. But it depends on all the roads where crossings are rendered on to have the same drawing width at the zoom levels it is used on. And both the static and the rotated symbols suffer from the problem that they are rendered after the road layers. So, in case there are bridges above the road with the crossing, the rendering results are confusing or even misleading.

Wrong drawing order of crossing symbols in the French style
Showing road crossings – advanced version
Since the AC-Style uses variable drawing width for roads, both depending on road class and on explicitly tagged or estimated ground width based on secondary tags, a different solution is necessary. The full list of requirements was:
- Contextualized rendering of crossings adjusted to the width of the road.
- Suitability to be rendered relatively early already in a subtle fashion.
- Works well as a non-blocking symbol.
- Rendered within the road layer stack so crossings underneath other roads are not shown above those in a misleading way.
- Possibility to vary the symbol depending on secondary tags.
- Rendering works both on a node located on a single road line in the middle, as well as at the edge between two connecting road segments.
- Rendering works both on a straight road and at a corner.
- Rendering works together with existing variations of the road line singnature (paved/unpaved, access, lanes etc.)
- Degrades gracefully in ambiguous corner cases like at the transit between different road classes, between normal and bridge/tunnel roads and at junctions where more than two roads meet.
That is a fairly long list of requirements and it took quite some effort and experimentation to develop a solution for this.
Here is the basic design i came up with (top: default, middle: unmarked, bottom: crossing:island=yes, double resolution versions for z16, z17, z18 and z19).
This is obviously inspired by the French style. The color used is generally the same as for the access restriction dashing, just slightly varied in some cases. So far i use three three design variations, which are all shown in the examples above: Normal, unmarked and with crossing:island=yes.
The number of dashes depends on the drawing width of the road. The length of the crossing symbol along the road is based on a combined criterion (at least 2 pixel, at max 5 meter on the ground and 0.65 times the road width, but in any case at least 0.35 times nominal drawing width).
The symbol is drawn with a slightly enlarged background in the road’s fill color to ensure good visibility against the road with variants of the normal line signature.

Appearance of crossings on roads with different secondary tags (from left to right: normal, bridge, tunnel, unpaved, access=destination)
And it looks exactly the same no matter if the road is a continuous way at the crossing node or if it is split there. When the road’s secondary tags change at the crossing this usually works without problems. When the road changes its road class only the higher z_order part is shown with a crossing.
And – most importantly – the crossing is drawn within the road layer, correctly placed in the drawing order.
When the road has a corner at the crossing node, the crossing symbol is shaped to follow that corner.
This might look a bit weird but it ensures the symbol fits into the road even for wide roads at higher zoom levels. And keep in mind that a crossing directly at a corner is unusual, so having explicit feedback on the unusual nature of such a geometric constellation is not necessarily a bad thing.
Finally, the most tricky part: Junctions. When you have a crossing node directly at a junction where more than two roads meet at their ends, the situation is inherently ambiguous. It is not quite clear which road the crossing is actually crossing here. I try to determine that by scoring the roads involved by a number of criteria. This is using a somewhat unusual SQL contruct. The query for just normal crossings would be using a simple geometric join similar to the ones used in the turning circle query, followed by an aggregate ST_LineMerge() of the roads involved to take care of the split and un-split road cases. For junction handling you need to limit the number of road lines in the join to either one or two, with the selected prioritization depending on if the roads connect to the crossing at their ends or in the middle. This is accomplished with a lateral join and a CTE within the join.

Rendering of crossings ambiguously tagged on junction nodes depending on connecting road types and their secondary tags
Conclusion
There is a reason why road pedestrian crossings – despite 12M cases of mapping in the OSM database – are rarely shown in maps. It is difficult to display them in a way that integrates harmonically with the rest of the style because they are essentially parts of the road network. What i show here is an advanced approach to handling this, designed to meet a number of necessities you have in a map style with sophisticated road rendering.
There are a number of extensions of this feature you could imagine as future improvements. One example would be further differentiation of the crossing symbol based on additional tags, another would be to take into account the crossing path geometry or extending the design concept to railway crossings.
As usual, the changes discussed here can be found in my experimental map style project. A few real world samples can be seen below, more can be found in the AC-Style sample gallery.







