OSM exists now since more than 20 years. During this time, a tagging scheme evolved. It has undergone several changes since, is partly approved by the community, but never anything was forced. The freedom to invent new tags is considered a strength of OSM.
The OSM tagging scheme is clearly a result of swarm intelligence, which is sometimes said to be superior. I wondered how well this worked and thus started to analyse it. I’ll probably blog about this in a loose series of blog posts, starting today with looking at the highway
tag, which according to the wiki identifies “any kind of road, street or path.”
In most cases, OSM elements are categorised in a hierarchical manner, with every step narrowing the meaning of the former step: highway=service
, service=driveway
, driveway=garage
for example. A top level type=highway
is missing and has to be derived implicitly.1
The values of a certain tag should ideally be choosen in a way, that there is a match for every object in the real world belonging to this category. And there should be only one match. So, a highway=service
must not qualify for a highway=footway
at the same time.
Restricting my study further, I choose to look only at values used for linear features, that is, way elements. There are about three dozen of common values in the database. They match the values listed at the wiki page.2
The Present: Criteria used for Highway Classification
When you are faced by a highway feature on the ground, which is not yet in the database, you have to decide about the value of the highway
tag.
While it’s sometimes really easy to decide which value is correct, other situations lead to endless discussions in the forums. Such discussions are a hint that there is something wrong with these values. So I asked myself, by which criterion the values have been decided. As it turns out, there are severeal criteria in use, and they are mixed.
The following figure shows a venn diagram containing most of the common values. I tried to sort them by the criteria used for distinguishing values.
First of all, there are some values that classify the highways by (destinated) access: motorway
, footway
, cycleway
, bridleway
, pedestrian
and busway
. They are often recognizable by a sign at the beginning of the way (at least in Germany). There is one more value, which is recognizable by a sign, but does not fit well in this diagram: living_street
. It differs from the other values in not defining a certain destinated access. (And in Germany trunk
is also recognizable by a sign, but that is not the case internationally.)
For (motor-)vehicles there are additional values which classify highways by importance3: trunk
, primary
, secondary
, tertiary
, unclassified
, service
and track
.
There are also some additional values for pedestrians. These are classified by make-up: steps
, ladder
and elevator
.
Two values are defined by the surroundings of the highway feature: residential
and corridor
. The first one is (in my oppinion) identical to unclassified
in a residential area and the second one is just an indoor footway
.
Two values are lifecycle values: proposed
and construction
.
Then there are two joker values that could be used almost everywhere: road
and path
. While the value road
is needed, because there is no main tag (it replaces a type=highway
without a highway
tag), path
never got a clear definition and is abused (in my oppinion) for stuff like mixed foot- and cycleways.
Finally there are some values with very special meaning: escape
, bus_guideway
, emergency_bay
and via_ferrata
.
As you can see, there is no single criterion that determines which value is used. If there were, there would only be one circle in the diagram above. Instead there are several criteria that overlap. This is far from ideal.
The Past: Historically Grown
Two questions come to mind: First: How did this come to be?
In the beginning of OSM, people wanted to create a map. A map, like the ones you could buy in a shop. These maps where car centered, like most of the thinking of our society at these days and thus it is no surprise that the tagging scheme evolved was somewhat car centered too.
And you have to keep in mind: Back then, there was nothing but a blank sheet of paper. I remember, when I started in 2007: I lived in Freiburg (on the edge of the Black Forest). Only a handful of Freiburg’s streets were mapped at that time. That was it. I started cycling all the other streets using my old Garmin Gecko device, which could only save the tracks of a little bit more then one hour of survey. After that I had to go home to enter the streets (adding highway
and name
tag) and then I set off again.
After several weeks (or months), I decided that I had completed Freiburg (meaning I had added all the primary
, secondary
, tertiary
and residential
highways). I’m not sure, but I think I also added some cycleways
and some footways
. At least I remember that, as a member of the germans cyclists federation (ADFC), I was keen to do so.
The tagging scheme of the highway
tag evolved in these days. Could we have done better? Maybe. At least I think I can safely say that creating a group of experts to develop a tagging scheme would not have been better. OSM would probably have died before the experts had finished. It was very important that people could just start right away and use what’s there and invent what wasn’t there.
What could have been improved is a consolidation phase. I mean: Taking a step back, reviewing what we did, and deciding how to improve things. This happened, but it typically involved a lot of discussion, often resulting in no decision or, worse: contradictory results. I think swarm intelligence failed to some degree in this respect. Perhaps an expert group doing this consolidation would have been a better idea? I don’t know.
The Future: Will the Mapping Scheme be Improved?
The second question is about improving the current state. Should we attempt to do so, or is it already too late?
In politics, conservative parties typically establish stability, which is a healthy thing. The downside of stability is a lack of adaptation to new environments, which can lead to disruption from time to time.
A better approach would be to do something in the middle: Adapting in small steps. This maintains stability while avoiding disruption. However, it’s a balancing act.
The same is true of the OSM tagging scheme: I recently read somewhere that an OSM contributor is waiting for an OSM fork, before continuing to contribute. Other mappers have left the project completely, either complaining about the tagging scheme or doing so in silence. These are signs of too much stability and too little change.
Specifically, with the highway
tag, my first step would be to get rid of the values proposed
and construction
. They are clearly superseeded by the lifecycle prefixes and could be automatically transformed into proposed:highway=road
and construction:highway=road
immediately.
Next, I would replace residential
and corridor
with unclassified
and footway
, but I can predict that this will cause some resistance from part of the community. Alternatively, residential
and unclassified
could be merged into a new category, such as normal street
or so. This might be better, because people confuse unclassified
with “no value” anyway.
After that, things will get more complicated. I think, that the chaos with path
should be improved next. Paths should only be paths. Foot-, cycle- and bridleways, as well as combinations of these should be grouped into a single category and further differentiated using the access tags.
That’s three steps already. Enough for the time being. Don’t take on too many steps at once. I would be happy if at least the first of these step were taken in the near future.
-
One may think that deriving this top level tag is a simple thing. This may be true for a human in most cases, but consumers of OSM data are quite often computer programs. They have to check all tags that could qualify as the so called main tag - at the time of writing this are roughly 30 tags. Further more: This main tag can have a lifecycle prefix, which multiplies the number of tags to be checked: In practice you have to do about 300 string comparisons for every element in an all purpose application. String comparisons are expensive (which is computer scientists way of telling that there is no fast way to do so). Even with the use of hashtables, which can speed the whole thing up I estimate deriving the main key(s) of all elements from planet.osm to take about 2 hours at least. ↩
-
I omitted the variants ending in
_link
for simplicity. ↩ -
The term “importance” here is defined by the role they play for connecting places (when using motor vehicles). ↩
Discussion
Comment from Crotaro on 28 August 2025 at 13:26
Very interesting read. I also occasionally wondered how well this entire OSM project works out in practice with the seeming infinite amount of tags (at least to me as a newcomer). I think user-friendly programs like StreetComplete, that don’t push on the user the burden of needing to imagine in your head what the different types of tags would look like / represent irl, are a big help in somewhat unifying the practical definitions for the different tags. The easy-to-understand descriptions and pictures make it so much more approachable to help out in completing a region.
Comment from kumakyoo on 28 August 2025 at 14:01
@Crotaro: You do not need to know all these tags. I do not do too. Typically, one specializes in a certain area, for example crossings. Then you learn the basic tags which you need to map crossings (highway=crossing, crossing=…). Sooner or later you’ll run into some crossing, where you find something which you thing, should be mapped (traffic light buttons for example). And thus you look it up in the wiki and so your knowledge grows. After a while you are customed to these tags and you can add a new subject, like traffic signs or what ever.
StreetComplete is somewhat norming. If SC uses a certain tagging scheme, it’s high likely that you cannot deviate much from it, because sooner or later some SC user will come by and add the SC tags. That’s OK in most cases though. What you do not learn, when you use SC, is the tagging scheme, because you do not use it.
Comment from darkonus on 30 August 2025 at 06:51
Great article, especially the diagram! Really cool to reflect on the tagging system from this perspective.