Turn restrictions, like No left turn and No U turn, regulate traffic flow at intersections and accurately mapping them is critical to calculating valid routes on a map. The Mapbox Directions API uses OpenStreetMap which means you can easily update turn restrictions yourself — here’s how.
Consider a scenario where there is No Left turn allowed from North Beverly Drive to Dayton Way
1. Install plugin
To get started in JOSM, download the turnrestriction plugin in Preferences > Plugins.
Installing the turn restrictions plugin.
2. Select ways
Next, select the ways involved in the turn restriction: North Beverly Drive and Dayton Way.
Split the road at the node where the turn-restriction will be added.
The selection order of the ways is important in order to determine the type of restriction. Select North Beverly Drive (from) then node at intersection (via) then Dayton Way (to).
3. Select type of restriction
Finally, select the type of turn restriction to add. The plugin will detect the most appropriate restriction based on the order of ways selected. Done!
Behind the scenes, this applies the appropriate relations and tags that compose the turn restriction. Read more on how turn restrictions are modeled and how to add complex attributes like temporal restrictions on the OpenStreetMap wiki.
Adding a turn restriction using the turn-restriction plugin: select ways, then select type of restriction.
Here’s an overview of some of the tag combinations describing turn restrictions in OpenStreetMap: