Let's talk about highway classification in OSM

Hi all,

The values of highway=* have always been a big debate subject all around the world. Every country has its own classification or interpretation and oftentimes there are edit wars or endless discussions about what to base the value of highway=* on.

To me, it seems like it’s all been caused by the ambiguity of the tags’ names, e.g. I feel like almost only English-speakers could understand what ‘trunk’ means in the context of roads and don’t even get me started on highway=unclassified.

It’s clear that a rework is much needed but we’ve gone too far and every renderer or router relies heavily on the highway=* key and its values.

What’s interesting to me is that railways have not followed the same path and instead managed to be their own thing with the value of railway=* actually being dependent on the type of rail (yes, it’s not perfect, but better in every way compared to highway=*).

To still have the information about the importance of the railway, some countries like France started using the proposed importance=* key.

This made me think: “what if highways worked similar to railways?” and eventually I made a conceptual table listing how I would change every interpretation of specific highway=* values. (Ignore the Paths section, I know it’s far from perfect and it’s not related to this discussion.)

Because I tried to make them like railways, highway=road is used, modeled after railway=rail combined with the wide usage of service=* that no longer requires highway=service.

The other main point of focus is of course the importance=* to replace the current values of highway=* which have obviously diverged far from the original intention.

However, there are some problems with the importance=* key which include:

  • importance=international works quite well in Europe but e.g. in the US, it’s probably not appropriate to call an East-West road of international importance, so the meaning would have to be adjusted
  • the values signifying lesser importance, e.g. on country or municipality level, are hard to have one value to be consistent among all countries and continents when local governments are called by different names. I tried to make it follow the values of place=* but today these are rarely used and admin_level has taken their place.

One major usage of the highway=* values is the fact that routers treat it as a replacement to tags like smoothness or maxspeed when they haven’t been specified. If still not enough roads have had these tags filled in, importance=* should take that place. If that still would lead to some problems, I though that something along the lines of grade=*, inspired by tracktype=* could be used, if absolutely necessary.

To explain other stuff in the table:

  1. motorway=yes would replace highway=motorway, as defined locally.
  2. expressway=yes would replace what some countries tag as highway=trunk to describe roads of high quality, often access-controlled.
  3. I’ve seen some people say highway=unclassified is just like highway=residential but not in residential areas and others say it’s another highway=* value of importance between tertiary and residential. I’m not here to argue which interpretation is correct but to propose an alternative: abutters=* should be used to describe the surroundings and a dedicated importance=* value is created.
  4. Highway_links are being replaced by a dedicated service=* value, similar to how it is with railways. In the table, I proposed two separate values being =ramp and =slip (or =sliproad). Now, I know Wikipedia treats them as one and the same, just one is used in America and the other in the UK, but I believe there is a difference and it would be useful to keep the distinction. I view ramps as being part of grade-separated junctions and slip lanes are usually 90-degree turns that avoid an at-grade junction.
  5. The other thing about highway_links is that currently we use the value of the road that’s higher in the hierarchy. Personally, I never understood that because it then doesn’t give information about the importance of the ramp. With the use of importance=*, it does mean that usually the lower importance is used.
  6. With the exception of living_street and path-related features, all other highway=* values that describe roads are replaced with service=*. I thought about the best treatment for each of these but in the end all of them got moved to the service=* key.
  7. The current highway=service needs to find new, specific values of service=* for each of the uses.

Now, realistically this has a zero chance of being implemented. Simply because of the sheer scale of the proposal which causes never-ending opposition because of some details and, of course, because every software app works on these tags and would break entirely if all roads got tagged as highway=road.

Instead, I want to ask if, once the quirks get fixed up, could we start double-tagging importance=* on roads? My proposition does use highway=road for every road but adding the other keys wouldn’t break anything. This means that there could be local semi-automated edits everywhere across the globe where e.g. all highway=primary roads in a certain country or region get the importance=national tag, to accurately represent current classification. Then, renderers that like to be up to date, could render roads based the importance=* key and if that key is missing, then it should render it from the highway=* key as normal. Ideally, the usage spreads all across the world and, in many many years, if enough roads have this tag and software adapts, we could finally ditch the weird values of highway=* and turn them all into highway=road instead. After that happens, validators in OSM editors should point out as an error when roads have neither have an importance=* nor a service=* tag to avoid making “bland” roads too easily.

I invite everyone to discussion about the proposition from the last paragraph, the desirable values for importance=* and perhaps about the table.

6 Likes

I don’t think your proposal really explains how the importance tag would be defined. Unless this is very clear, it would be likely to end up being mapped to official classifications, which I think is what you are trying to avoid.

For example to start at the top, what does “international” mean? Is it literally a road that crosses an international border? But presumably the 100+ road crossings between the Republic of Ireland and Northern Ireland wouldn’t all get this tag. Or did you have something like the European E network in mind? But that takes us back to relying on official classifications.

On a minor point I’d suggest removing the “county” reference. Words related to “county” apply to administrative units of very different size in different countries, so this would be likely to cause the same kind of confusion as the current tags.

9 Likes

So the tag is based on this proposal but the rules for e.g. importance=regional are exactly the same as for highway=secondary per the highway proposal.

Yes, it’s similar to the E network or the TEN-T network but as I pointed out, it only really works well in continental places of country sizes similar to Europe’s.

There is one line of rail in France with this tag.

I pointed that out in the post and I’m open to hear suggestions for better names for the values.

I’m afraid I don’t really see what the proposal here would achieve. Other than changing the key- used to hold highway classification information and the nomenclature used in the OSM-tag-values for the different classification levels, you’re still proposing a system in which each country would have to map its own highway classification / hierarchy onto a standard set of OSM tags-values. Is that really any different from what we have at the moment? What specific problems does your proposal solve?

The current names we have in the highway=* key may not be ideal internationally (they were based on the UK road hierarchy as that’s where OSM originated). But most countries have some sort of similar hierarchy of roads, and whatever system we have for tagging, we’ll need to map those roads onto some form of standard OSM classification. For some countries it’s going to be easier than others, but this is essentially something each country needs to figure out with its local mappers whatever tagging scheme is used.

19 Likes

It will be standardised because right now in some countries all highway tags correspond 1:1 to official classification when it might not be 100% accurate. The importance will be standardised as a consistent and coherent, official classification will have dedicated tag, highway_links will be standardised (right now some countries prioritise giving _links the lower category while most countries prioritise the higher one) and what remains as local classification is some details with motorway=* and expressway=*. So in short, the current inconsistent scheme, messy for data consumers, gets ported to a straightforward and consistent scheme.

The inconsistency with the usage of highway=*. If you’d map outside of the UK or take a look at the way it works in other countries you’ll see how bad it gets.

I wish it were that easy. First of all, half of Europe maps highway=trunk as the proposal described it and the other half maps it for expressways, so the lack of highway=expressway really shows. Next up, some countries treat highway=unclassified and highway=residential as the same with different surroundings and others treat it as separate importance values. How does that look for data consumers? They must apply different criteria for different countries.

To add onto the rationale, the current tagging doesn’t reflect the approved proposal too well, especially with the added divergence of importance-based criteria by having highway=motorway or highway=living_street. The tagging clearly needs to change and the simplest and best way to do it is to port the values whose meanings depend on country over to a scheme that is coherent globally AND it doesn’t hurt data consumers. How great is that?

This proposal is a complete non-starter due to the sheer number of things that would break if you tried to implement it.

9 Likes

Please read the whole post before making such comments.

3 Likes

I still feel you haven’t explained how this would happen. What would prevent this ending up as a mixture of national classifications and physical characteristics varying by country? How, in practice, will mappers decide which roads are important?

5 Likes

Expecting that the current highway=* values will ever be able to be deprecated and superseded by another tagging scheme without breaking things is simply not realistic, even if you double tag both schemes.

2 Likes

Wow, I really forgot that wasn’t an international standard. It’s usually about linking cities or regions of certain sizes or the amount of (transit) traffic and yes, most of the time it does depend on official classification so for starters, countries which link highway values with national classification could automatically add the corresponding value of importance=* but when someone notices that a certain road clearly does not fulfill such a role, they could change it. This can be easily seen by this example.

If you want to this to be meaningful, you should distinguish what’s realistically possible, to fill the gaps in. Otherwise this is simply fantasizing your personal dream in OSM publicly, wasting everyone’s time, although it could be discussed in OHM later.
0. importance= naming is bad, as the “importance” may not be the same as the level in the hierarchy. Eg a highly trafficked urban =primary may be said as more important than a sparsely used rural =motorway far away. You are further adding in the context for =urban to =rural , worsening it. This is not the terminology used in road (functional) hierarchy, but design standards.. I do agree at least =motorway can be distinguished with an attribute. Eg in Japan, all of National Expressways, Urban Expressways (basically poorly named motorroad=yes , can be 40~50km/h elevated roads only, not US urban freeways), etc use =motorway , which are completely different.

  1. motorway= should be a legal traffic class, not be a replacement for highway=motorway where it’s not defined legally (viz US freeways), to be consistent with motorroad= . For the unmentioned motorway=ramp , You didn’t consider motorway= is being used for the exact extent of legal motorway section on the =motorway_link now.
  2. I have always disliked expressway= as this term is used for motorway in many countries around the world, as seen above (strangely the literal Japanese translation for the National Expressway class and routes would actually be “motorway”)
  3. Indeed there lacks a non-“residential” local street, however ditto my disagreement with importance=
  4. “Slip road” is the British term for US “ramp”. This doesn’t make sense. You would have to use eg =slip_road and slip_lane , but I believe it’s better to distinguish whether they are in an intersection or roundabout , and interchange , however junction= has problems with needing to be used for junction proper inside the physical conflict area, not the surroundings.
  5. This is not the only problem. The more complicated case is when the =*_link is branching, connecting different highway= in interchanges. A single val doesn’t solve it. On the other hand, the lack of =unclassified_link , =residential_link , =service_link , and =track_link is real.
  6. They aren’t “services”, in terms of serving something for =service
  7. Redefining service= makes no improvement

They have no want, nor a need to read it, as your premise of replacing highway= is unworkable and unnecessary in the first place. The rest is merely details implementing your flawed assumption.

1 Like

I don’t know what is the point of this hierarchy. Is it a hierarchy in terms of quality? Because I don’t see a point in treating a motorway leading to nowhere better than an important non-motorway road.

Unfortunately it doesn’t work to have one name for roads connecting bigger villages or smaller towns as well as connecting city districts, unless you have a better name in mind.

As per the approved proposal, the values of highway=* form an importance hierarchy, not functional.

I don’t think this information about the section between the sign and the main road is so important but if it is then it could still be tagged as such by highway:category=M.

I understand but it also exists as a worse version of motorway in multiple European countries. In this article it’s also treated as such.

“Ramp” definitely sounds like a road going upwards or downwards which makes sense for interchanges while a “slip” or “sliproad” sound fine as being in an intersection or roundabout. I’m not sure what’s wrong here.

Can you give an example? I’m not sure what you’re talking about.

Yup, that’s why it’s better to move it being a link into a separate tag.

The service=* tag works here just like it works for railways so it describes the functionality for a non-main road.

Why? Improvement over what?

I’m not sure I understand this part of the proposal. E.g. service=pedestrian appears on its own. Is this mean to be used with a highway=service tag, with lots of highway types that are currently separate falling under the same main tag?

Incidentally this use of service= for railways never made much sense to me, I don’t think it matters much as mapping railway yards and sidings is a relatively specialised activity, but I’m not sure it is a good example to follow.

The problem is that you wrote quite a lot of bobbins before “Now, realistically this has a zero chance of being implemented” and then went on to talk about an (undefined) “importance” tag.

Until you can clearly explain what it is that you’re suggesting (how about writing a diary entry - with examples!) people will either think you mean something other than whatever it is you do mean or (in my case) have genuinely no idea what you are trying to do.

6 Likes

Reminds me of how Waymarked Trails labels network=icn as “Continental” instead of the more literal “International”.

You don’t know just how happy this distinction would make router and renderer developers. For example, Valhalla has all kinds of logic to guess whether it’s a ramp or slip lane. Renderers would need to guess as well to solve the barbed wire effect. If everything else about the proposal is a nonstarter, this part alone deserves more consideration.

That said, the concept of a “link road” is a bit broader than either ramps or slip lanes. For example, at the junction of Central and Lawrence expressways, there used to be a very tight cloverleaf junction, amazingly unsafe. At some point in the last 20 or so years, they closed the right turn ramps and made the loop ramps into two-way city streets that function as link roads. Streets that connect highways are fairly uncommon in the U.S., but I understand that they happen more frequently in Europe, where link roads even have special signs in some countries.

As it is, data consumers can’t infer the official classifications from highway=* even if they want to, because it’s all implicit. If we really think data consumers should create their own mapping from highway=* to official classification per country or per region, then it just means everyone reinvents the wheel every time they make a map.

Regardless of whether this is a good practice, we could encourage local communities to more explicitly tag official designations. It could go in the generic, context-sensitive designation=* key or something more specific.

In the U.S., despite clear guidelines to the contrary, we saw countless conflicts where new mappers would mass-reclassify their region to match route designations or the official functional classification system. Either was problematic because you could literally see state and county borders based on nothing but bureaucratic differences. Nowadays, we point these mappers to route relations and HFCS=*, respectively. That has helped to reduce conflict, though occasionally mass retagging still occurs because these keys aren’t very prominent.

There’s a very strong analogy to place classification, where keys like border_type=* (and a dozen alternatives) exist to satisfy the natural urge to tag official designations without detracting from OSM’s usability.

4 Likes

No, all tags are meant to be used with highway=road (when you think about it, highway=service sounds like it should be a node or an area amenity) and every road should have either the importance tag or service tag, unless it’s a ramp or sliproad which still needs importance.
But for now they should appear alongside the regular highway=* value.

Do you have a better idea? Maybe it should be usage=*?

Yes, because it includes retagging ALL roads into highway=road.

Why are you lying? I was talking about importance the whole post even before mentioning implementation. The tag should be treated just like the highway values when following the highway == importance proposal so I believe it’s not that hard to comprehend.

I’ve already given multiple examples all over the post. Let me repeat some:

  • all motorways get the motorway=yes tag
  • what most European countries map as highway=trunk get the expressway=yes tag
  • the most important international routes i.e. roads similar to the E network get importance=international
  • what is tagged as highway=primary in a country basing the highway tag on importance is further tagged as importance=national
  • highway_link gets replaced with either service=ramp or service=slip/sliproad depending on the circumstances

I could really go on but it will be a lot easier if you simply check out the table and maybe re-read my post to find these examples.

That’s a good one, I’ll think about it.

That’s true that there are some other uses of _links so each one should be classified and named and turned into a value of service=*.

1 Like

How new scheme would prevent the same mistake that is also currently a mistake?

3 Likes

I understand the point you are trying to make. highway=* key is kinda all over the place - sometimes is used to show importance, sometimes for quality or even for “special rules" (like in living street).

It creates some problems with living streets, as some people don’t want to use highway=living_street if service or tertiary works better (they use living_street=yes instead). Maybe there is the same problem with motorway? I guess there is a possibilty that there is a motorway that is not really primary yet.

However I think your proposition is trying to do too much. I can totally see that we can go for motorroad=yes and living_street=yes instead of highway=motorway and highway=living_street. That way we can show the importance of the road while keeping the information about the signs. But I don’t really see the point of retagging all links to service or changing all road to highway=road. It would make reading the map for either people and machines far more difficult.

1 Like

From this thread you’d think the only road users were motorists…

7 Likes