View Full Version : Long names in the shields on motorway links

05.03.2011, 10:31
The app draws shields with what is intended to be road numbers over the roads, when available. These numbers come from the ref tag on the roads. In Europe it may be E 47 or BAB 1, in the US I 5 or CA 55.

Some OSM contributors have entered more verbose information into the ref tag of the motorway links. For example an on-ramp form a street called El Toro Road to a highway named CA 73 may be tagged ref=from El Toro Road.

This is not a good tagging practice, but it is there, as the contributors intended their data to be used by more than just routing apps.

Currently, the routing app in my area shows dozens of these shields with long confusing wording in them, floating seemingly randomly around motorway exits and entrances. It takes knowledge of OSM to understand where they come from. I can imagine how confusing they are to an average app user.

Is it possible to make the app smarter by having it check the length and possibly contents of the ref tag before making the decision to place a shield on the road? If ref=CA 73, then draw a shield, if ref=from El Toro Road, then don't draw a shield? The max length to draw a shield could be set at something around 7 characters (CR S123), but if there is a semicolon in the ref tag value, then draw it, but split the value in two lines at semicolon (as a route may have two numbers):

ref=A 500;A 550 would be shown as a shield containing

A 500
A 550

Another test could be simply to look for numbers in the ref tag. If there are number, draw a shield, if not, don't.

Yet another option would be to not draw shield on motorway links at all. This problem affects mostly motorway links. I have not see any other maps generated from OSM data (including Mapnik, OSMArender, Open MapQuest) that place shields on motorway links, even as they place shields on motorways and roads.