Efficiently adding direction=* to highway=give_way/stop
Posted by species on 20 October 2015 in English. Last updated on 25 October 2015.I recently stumbled upon the direction=forward/backward key. It can be used to denote from which side a highway=give_way or stop is valid. Without that tag, a router would add a penalty also when crossing from the ‘wrong’ side, which would lead to wrongly calculated travel times.
As we have a lot of give_way- and stop-signs mapped in Graz (~1500), I was looking for an efficient way to add the direction=* info on it.
For adding “direction”, you need to know the direction of the underlying way. In the default JOSM map style this is only visible if you click on it. I was looking for a style that shows the way direction on default. I found none, so I wrote one. It is now available in JOSM via Settings → Map Paint Styles.
The style shows the direction of ways with a highway=give_way/stop/traffic_signals only (the ugly red >). I found no way to show the “direction”-tag by rotating the symbol or to show an arrow besides it in or against way direction, so I simply chose an up-arrow (↑) for “forward” and a down-arrow (↓) for “backward”. The orange background allows easy spotting of missing “direction”-tags.
I quickly got tired of searching for not-yet-tagged nodes in JOSM manually, so I wrote an Overpass Turbo query. Open the link, click Run to show give_way’s with missing direction, then Export → Load into JOSM. Now you can have all the traffic signs in your area at once in JOSM ☺.
The orange rectangles show quickly where the tag is missing. My workflow to add them fast was:
- Zoom in via scroll wheel close enough to clearly see the direction of ways
- With the mouse, mark all (hold CTRL) orange nodes that are to be tagged “forward”
- I keep direction=forward in my clipboard, so I press CTRL-SHIFT-V
- Mark all that are “backward” (click the first without CTRL)
- Press ALT-A (I keep direction=backward as last used tag); press Enter with my thumb on the Num-pad
If someone has a quicker work-flow, I’m always pleased to learn to map more efficiently ☺.
Just keep in mind, that JOSM doesn’t know about nodes tagged with a direction yet - so it doesn’t change the tag when you reverse the direction of a way!
I would hope to see the “direction”-tag implemented in some routers soon ☺