wiki:left-right-hand-traffic

Languages:

Left- and right-hand traffic

JOSM has an internal database of areas with left-hand traffic.

The database is used e.g. at the following places:

  • The default internal mappaint style (for cycleway lanes and tracks on highways and roundabout icons)
  • The Lane and Road Attributes style
  • The Maxspeed style (for maxspeed:forward and maxspeed:backward)
  • The Priority Road style (for priority_road:forward and priority_road:backward)
  • For the create circle action, to use the correct way direction, if you create a roundabout.
  • The plugin TurnLanes-tagging

The file named "left-right-hand-traffic.osm" is stored in your JOSM cache folder. You can open this file in JOSM to investigate the borders. The areas in the file describe the areas with left-hand traffic. All other areas use right-hand traffic.

You can use the pseudo classes :righthandtraffic for right-hand traffic and !:righthandtraffic for left-hand traffic or the eval expression is_right_hand_traffic() in your mapcss mappaint style. See Help/Styles/MapCSSImplementation for more information. Note that you maybe get wrong results near to borders of countries with different driving directions since the area borders of left-hand traffic are simplified in JOSM. These simplifications are necessary to reduce the size of the database, but it can be refined on request.

If you notice an error in the database you can create a new ticket by clicking in JOSM menu Help → source:trunk/images/bug.png Report bug.

The left-right-hand-traffic.osm file is generated from the more detailed boundaries file. More infos about it see MapCSSImplementation#Territoryselector (screenshot preview).

Screenshot of the areas with left-hand traffic:

(data used for image ©OpenStreetMap contributors ODbL, tiles: OSM-carto CC BY-SA)

Last modified 16 months ago Last modified on 2017-07-01T20:43:09+02:00

Attachments (1)

Download all attachments as: .zip