Route guidesRoutes Map
Mobile appApp Log in

Conditional OSM tags

18 Nov 2024
Find a better bike route. Try our map & route-planner »

Become a supporter

I'm not sure how often cycle.travel updates its OSM data, but does it follow "bicycle:conditional" tags? For example, a cycle track in Leeds is currently temporarily closed. This is tagged on OSM as "bicycle:conditional=no @ 2024 Nov 13-2024 Dec 23", when c.t next updates its data will it follow this restriction? Thanks!

Comments

Tue 19 Nov 2024, 10:14

It notices the existence of conditional tags but it doesn’t parse them (there is unfortunately no parser for the infamously complex opening hours grammar in the Lua language that c.t’s routing engine uses). It’ll show “restricted cycling hours” for any route using that section. 

Tue 19 Nov 2024, 12:57

Oh, this question is interesting. There's a set of byways in Suffolk — actually part of the Wolf Way, amongst other routes — that have been closed all year. I'd gone to OSM hoping to tag it as such, but couldn't work out how to mark a temporary closure. That is, I couldn't find a standard notation. Is that @-labelling generally accepted? If so, I would at least add the metadata.

Of course, my motivation is to avoid being caught out when I've not properly checked a route (for example, if I'm out on a ride and I change my plans). From the descriptions I've seen of the routing algorithm, I suspect a request like "don't use this road" is rather difficult to accomodate unless it's encoded in the source data.

Tue 19 Nov 2024, 17:42

I'd argue it's ok to set access=no with a note if something is closed for that long. You can always undo the change when they reopen.

Thu 21 Nov 2024, 08:17

Maybe, yes. It’s slightly complicated because it was just closed for six months, then extended later.

I did look into editing OSM at the time, though, but couldn’t find any guidelines. Actually I was hoping for some “closed until” syntax, like that described in this thread, but couldn’t find anything.

I realise I should be asking this on an OSM forum somewhere.

Thu 21 Nov 2024, 08:32

> infamously complex opening hours grammar

Richard, is it this one? If so, I could have a go. However, I’m not sure how this interacts with pre-calculated routes. I think I saw you mention that they’re generated weekly, in which case short closures are probably best ignored.

Thu 21 Nov 2024, 12:33

It is – there are libraries in PHP, Java, Kotlin, JavaScript, TypeScript, Python, Rust, but not Lua. But given that c.t doesn’t know about different times of day, and the routing graph is updated roughly monthly, I wouldn’t worry unduly – I think dan200’s suggestion of a simple access tag is probably going to be best in 90% of cases.

Enter to search, Esc to cancel