OpenStreetMap logo OpenStreetMap

A map of part of London

I have a couple of web maps, and they are supposed to show pedestrian crossings. If there’s some crossing infrastructure (for example - zebra stripes, or tactile paving and a lowered kerb) you’re supposed to see a “crossing” icon. If there are traffic signals associated with the crossing, that icon should be replaced with a “traffic signals” one.

Years ago it was straightforward - you’d get a highway=crossing tag on a node on the roadway, and there would be another tag, such as crossing_ref to say what sort of crossing it was. Some crossings (such as pelican, puffin and pegasus) have traffic signals; others (zebra and informal crossings) tend not to.

Unfortunately, it has got a lot more complicated.

Sometimes, the highway tag is crossing;<something> or <something>;crossing. Sometimes that something should be ignored and treated as a crossing.

Some crossings are added with crossing=<something> but without any highway=crossing tag. Of course I could just look for that, but in addition to highway=crossing I now also need to think about railway=crossing (and tram_crossing) and handle those separately (in my case, like level crossings). I also need to look for disused:highway=crossing and exclude those, even if a crossing tag is set. If highway is set to something that is not crossing, I probably should treat the object as whatever that something is rather than a crossing.

Attributes of crossings are often added with semicolon tags such as crossing:markings, crossing:island, crossing:signals (and for railway crossings crossing:barrier, crossing:bell etc.), and also tags such as crossing_ref (which is still around) and tactile_paving.

Alas, sometimes attributes such as crossing:markings can occur without a crossing tag, and in that case that’s a pretty good indicator that the object with that tag is a crossing. However, what about crossing:island? There’s a whole forum thread about that right now (it actually seems to be sometimes used to tag part of a crossing). In addition, tags such as crossing:markings will have “negative” values (ones that should be treated as if there aren’t crossing markings) and those negative values aren’t always no. Of course, each individual crossing: tag that I am interested in needs to be checked separately.

Once we’ve worked out that there is a crossing here, we need to see if it has traffic signals. That requires checking values in three different tags (crossing, crossing_ref and crossing:signals) and in the case of crossing, that includes some semicolon combinations.

Finally we want to exclude any crossings that we’ve got this far with that don’t really have any infrastructure (not even tactile_paving) - if someone has added highway=crossing but then explictly said “there is no infrastructure here” we shouldn’t show it as a crossing, because it isn’t one really.

All in all, that’s about 200 lines of lua.

Surely things don’t need to be that complicated?

Location: The Boltons, Brompton, Royal Borough of Kensington and Chelsea, London, Greater London, England, SW10 9TB, United Kingdom
Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Discussion

Comment from cquest on 5 November 2025 at 08:23

There is a detailed rendering on pedestrian crossings on the french basemap:

https://demo.addok.xyz/#20/48.80332/2.48515

It also shows tactile paving as well as bollards, but I’m quite sure I do not handle all tags as this as been done 10+ years ago !!

Comment from SomeoneElse on 5 November 2025 at 20:55

@cquest Interesting - is there a link to the tags used anywhere?

Log in to leave a comment