Ref tagging on link roads

I can’t find a clear answer to my question in the Wiki so I’m raising it here for discussion. Some link roads are tagged with a ref and some are not. I was under the impression that link highways (motorway_link, primary_link, etc.) were not supposed to have a ref, e.g., the ref of the highway they connect to yet some link roads in Thailand have them. In the past, I have not added refs to link roads.

see this:Wiki Highway-link

It is helpful when traveling with GPS guidance to see the ref of the highway displayed on the screen. But our mapping hasn’t been consistent. Another facet of this issue is that many times I’ve seen unnamed link roads that have no ref tag displayed as “Left turn on Primary Highway”, even though the road is obviously a linking highway. The mapper has for some reason decided not to use the link tag at all.

So, my question is, how should these linking highways be tagged?

1 Like

Hi @AlaskaDave, I understood links are supposed to be short sections used as ramps and u-turns for major highways, hence they should not have refs.

Slip roads/ramps in the UK and USA do not usually have names, and very few of them have route refs. (If they have refs it is usually where an overlap begins or ends, such as US 30 jumping onto I-80 for a concurrent section[1].)

Can you please post a few conflicting samples?

I have asked @nitinatsangsit for his expertise.

I cannot recall exact examples but I’ve noticed it often in my travels over the past few months.

My thrust here is to determine what the best practice should be going forward. As I said above, it’s nice to know that I’m going to turn onto a route with a known ref number, after all, that’s how I refer to those roads in speech, but if it disagrees with general OSM practice I’d like to know that. OTOH, if it seems legitimate, then let’s decide to do it across the board.

1 Like

IIRC highway=*_link should have the ref of the highway they link to.

@AlaskaDave I agree with you that the link road shouldn’t have main road’s ref tagged as its ref. The ref=* tag is only applicable for the link road if it has its own ref that is distinct from the main road’s ref.

As you mentioned, I also have found some of the link road tagged with ref=* which is the main road’s ref. This seems to be a misused of the tag to tag the link road with the destination road’s ref. In this case, destination:ref=* is the appropriate tag to tell the user which road the road leads to. This tag, however, is not required for most of the link road, especially if there is no signage. If the link road lacks the name and ref tags, the routing engine should be able to inform the user with the main road’s ref. AFAIK, at least OSMAnd is capable of doing this.


I agree to use the destination tag. Especially if you expect it to be displayed in your route guidance software.

See further details:

1 Like

I have used the destination=* and destination:ref tags in my mapping and believe that’s the correct method to deal with link roads. If we all agree on this then I suggest adding a note to that effect to our Thailand Wki and the general OSM Wiki. In addition, we should discourage the practice of adding a ref tag to the link road if is unsigned on the ground.

I would do it myself but every time I try to edit those damn Wiki pages I end up cursing in frustration. LOL

1 Like

I have done a query to find major links longer than 500m tagged with a ref. Found 18. Clicked on two of the findings an I am certain these are tagging mistakes and are regular major highways.

If I find the time, I would check them further to fix the tagging. Feel free to be faster than me :slight_smile:

Overpass Query
  way["highway"="motorway_link"]["ref"](area.searchArea)(if: length() > 500);
  way["highway"="primary_link"]["ref"](area.searchArea)(if: length() > 500);
  way["highway"="secondary_link"]["ref"](area.searchArea)(if: length() > 500);
  way["highway"="tertiary_link"]["ref"](area.searchArea)(if: length() > 500);
// print results
out body;
out skel qt;

Similar query could check for shorter links, leaving away the length query. When doing repairs, double-check that it is a link and not the start of the highway.

@AlaskaDave: not directly related, but would it make sense to upgrade these new u-turn ramps under the 118 highway as primary_link? These were initially tagged as unclassified, but from my wiki understanding, I think they would fit better the _link definition.

I wouldn’t object but I don’t really consider them link roads. They are U-turns, which is why they were tagged unclassified. I would assume the road class would make no difference to a routing algorithm.

If you want to change them, sure, go ahead.

1 Like

a u-turn links one highway to another highway. As a special case, it is the same one, just the opposite one-way direction.
I could follow the argument why it is a link.

As I had not seen the specific situation there myself (thanks pandemic): What are they connecting in addition? I saw u-turn lanes being 2-ways because they also provide access to other buildings/shops or roads. But here it simply seems to be a u-turn. Or is this just standard practice to have them in both directions, even if there will never be traffic in the other direction?


These are a bit different than an ordinary U-turn link in that a separate road leaves the highway and goes under a river-crossing bridge and then joins the opposite direction lane. Easier for you too look at one than for me to explain what it looks like. Take a look at way id:1012627615 to see what we’re talking about.

I’m not arguing for either solution. It makes no difference to me (nor I suspect, to any routing algorithm), but if Julien wants to do the work to change the classification on those U-turn ways, it’s fine with me.