Idiomatic/Standardized Tagging of Route Temporary Closure?

Greetings! New here, be gentle.

I have recently started using a a cycling app that leverages OSM data. In my area (Porto, Portugal), the cycling infrastructure is spotty, and on more than one occasion I’ve found myself at a dead end at the bottom of a hill because a route is either under construction or is in such bad repair that it is unpassable. I’d like to make the best of some unfortunate situations by helping others not find themselves in them.

In one case I have just added a note describing the state of the road section in question, as well as indicating surface conditions and grade with the standard tags. But I was unable to find a “correct” way to indicate closures. I know (because I read it here) that there are no official tags for short-lived status changes, which makes sense. These are more than short-lived, however, and in the cases I’m thinking about, I suspect better error is the one that doesn’t route cyclists into dangerous or nonexistent paths, and to rely upon someone (maybe me) correcting the map to indicate opening/safety once this is the case.

Any thoughts on this? Any standard practices being used?

Thanks!

If a way is legally closed (there is a way, but you are not allowed to use it) access=* would be your friend. If it’s closed for construction/repair highway=construction might help out. Otherwise, describe the situation of the “badly shaped” way in terms of smoothness, surface, …

A (cycling) route just require signage and is fully independent of any road conditions. If there are signs then there is a route.

Overall, a picture of situations you would like to describe would help others to understand your situation better.

1 Like

Awesome, thanks. That’s exactly what I was hoping for.

Will be sure to grab fotos for future reports!

You didn’t explain how not “short-lived” they are, so this can’t be answered. Need to know how long they will be closed.

1 Like

Good point. Unfortunately that information is generally unavailable; it’s usually not posted and tends to be subordinated to the schedules of associated projects which can proceed on unpredictable schedules. The only thing I can be relatively certain of is that the closures are temporary, as local government and developers tend to be committed to improvements.

If the closure is for a few days for utility works, I wouldn’t map it.

If the closure is for few months for bridge reconstruction, I would map it. You can tag construction work with an estimated end date. Additionally, you could add a map note.

2 Likes

Thanks, makes sense. Definitely more than a few days. These tend to be closures that pull up pavement entirely and have concrete or stone barriers placed for the duration.

If you do have solid dates, I’d recommend conditional tagging for the closure. That way, you aren’t relying on someone to adjust the map again after the route reopens.

1 Like

Oh, interesting, I wasn’t aware of conditional tagging. I’ll give that a look, and any doc links you have handy are most welcome.

Thanks!

Bear in mind that parsing conditional tagging is only slightly easier than parsing the Voynich manuscript and so you shouldn’t expect most routers to do it. Make sure any tagging falls back safely (i.e. put a realistic default in the non-conditional tags).

2 Likes

Yeah, it’s not perfect, if it’s a short term closure I’d leave the original tags as is, and use conditional tags for marking as closed.

1 Like

Ok, I think I have something that makes sense.

The image below details the changes I’ve drafted for this section. I opted not to use conditional restrictions, since according to all available information the path is closed indefinitely (weeds have literally grown around the barriers). Apologies for not having photos of this.

Location

I intend to mark the change review-requested anyway, but as this is my first nontrivial edit and perhaps closes this thread, feedback welcomed.

I intend to submit this at 2026-05-18T1200Z unless it requires adjustment according to feedback.

Thanks so much for your suggestions, everyone.

Just a quick update; I realized after posting my prior intent that changing the node from a point to a barrier would indicate that all three connecting paths were blocked at that point. As such, I’ve reverted to the connecting node being a simple point, and have added a concrete block barrier on the blocked branch only, as seen in the screenshot below.

Just a note on this, the whole issue around short term closures is why we started work on http://closures.osm.ch/ and have a further GSoC project starting this month that will hopefully get rid of the rough edges and improve routing engine and third party data integration.

Basically we don’t believe that OSM tagging is the way to resolve this (it is a deceptively easy hack though) and that using a slightly less tightly coupled to OSM geometry representation works better (including for OSM data consumers).

3 Likes

Ah, that’s interesting, thanks @SimonPoole . I’ll keep an eye on that.

While this might seem a bit of a hack, from firsthand knowledge I can say that this particular case is a more enduring/indeterminate/indefinite closure duration (at least a season, probably closer to the order of a year), and given the number of foreign cyclists here, the general terrain, the remoteness of the location, and the more recent popularity of fatter-tire gravel bikes for touring, I think it is worth the workaround until a more elegant solution is found.

This has been submitted btw. Changeset 182826059. This includes the closure description that’s the topic of this thread, plus a couple of other annotations to nearby routes.

1 Like