Tagging for the router

From OpenStreetMap Wiki
Jump to navigation Jump to search

"Tagging for the router" is the bad practice of using inaccurate tags or distorting data associated with map features to influence routing navigation towards the mapper's preferred router. Engaging in such tagging goes against the fundamental principles of good practice.

Examples

Trails Difficulty

When mappers use unsigned legal access tags (e.g., bicycle=*, motorcar=*, foot=*, horse=*) to denote that a certain path/track is "difficult" for them, it misleads routers into completely avoiding those trails. However, another end-user with more skill may have no trouble navigating them.

➡️ The appropriate method to tag difficulty for routing is by using corresponding scale tags such as smoothness=*, sac_scale=*, mtb:scale=*, dirtbike:scale=*, horse_scale=*, etc.

Pathways

When mappers uses unsigned legal access tags (e.g., motorcycle=yes + motorcar=no) to indicate that a particular way is too narrow for a 4-wheel vehicle, it misleads routers into potentially allowing other vehicle categories.

➡️ The appropriate way to tag pathways that are too narrow for 4-wheel vehicles is to designate them as highway=path or highway=footway, highway=cycleway, highway=bridleway depending on their main usage.

Narrow roads

When mappers use a different highway classification (e.g., service) to indicate a road is very narrow, it misleads routers into applying a different penalty based on classification.

➡️ The appropriate way to tag narrow roads is to add necessary additional tags to their main purpose classification (e.g., highway=residential, highway=unclassified, highway=service, highway=track) such as lanes=*, width=*, narrow=*.

Enhancing Routers

Dealing with routers that have limited support for certain common tags and use-cases is frustrating, but resorting to deceit is not the solution.

Engaging in such a practice not only confuses new mappers but also perpetuates poor habits. Over time, this can lead to contentious issues among a large number of mappers, such as the debate over the choice of service=alley for narrow roads. This has resulted in edit wars and significant efforts that could have been avoided if the same energy had been invested in simply improving the routers.

There are different ways to enhance router functionality:

  • Submit or respond to existing improvement requests on the router's respective project page (usually on platforms like GitHub) by adding comments or expressing support.
  • If you possess programming skills, consider creating a code branch and submitting a pull request.
  • Share any progress made with the community.