I announced our second tool based on Scout GPS data, Traffic Flow Direction, a few days ago. I didn't spend a lot of time on explaining how it works. This post will hopefully make up for that!
The goal of this plugin, and the accompanying web tool, is to make it easy to find and correct OSM ways that we think are missing a
oneway tag, based on billions of GPS points from Scout users. Here is what it looks like in JOSM:
I will walk you through installation, basic operation and some mapping tips in the next paragraphs. Happy mapping!
This is a JOSM plugin so, installation works like any JOSM plugin. Make sure your JOSM is up to date first. Then go to JOSM preferences. Select the Plugins tab and look for the TrafficFlowDirection entry:
Select it and click 'Update Plugins' at the bottom. After JOSM completes installing the plugin (and updating any others that may need updating), restart JOSM and you should see the main components of the plugin appear in the JOSM interface: the overlay on the map and the plugin panel.
You may want to adjust some basic JOSM settings to make optimal use of the plugin as well. The one I would recommend for sure is to enable directional arrows on ways. The direction of the way is crucually important for adding the correct
oneway tagging, so having that direction visible at a glance is really helpful. To enable this, go into JOSM settings and select the Display Settings tab. This is the topmost tab. Within display settings, select the OSM data tab. Here you will find the Segment drawing options:
I recommend selecting both Draw Direction Arrows and Only on head of way. Also make sure Draw oneway arrows below that is selected so you can see at a glance if a way is already tagged with
Like the Missing Roads plugin, the visual components of the Traffic Flow Direction are a map overlay and a settings / information panel. The map overlay shows clusters of suspected errors at low zoom levels, and individual errors at high zoom levels. Here is the colorful scene you get when you enable Missing Roads and Traffic Flow Direction at the same time:
(I recommend hiding the Missing Roads layer when you work on Traffic Flow Direction and vice versa :))
Zoom in on an area you want to work on and you will start seeing individual arrows:
The arrows depict OSM ways that should have a
oneway tag in the indicated direction, according to our GPS data. Click on an arrow to select it and find out more in the Traffic Flow Direction panel:
(If you do not see the panel, you may need to activate from the Window menu.)
The Info tab gives you some basic information on the selected direction error. The most interesting are probably the top two, indicating the % of all drives through that particular way traveling in the indicated direction, and below that the total number of trips that go through that way.
Validating and correcting the errors
Once you are zoomed in to an area where you want to fix some direction errors, make sure you have the best possible aerial imagery layer for your area enabled. Always remember that aerial imagery may be out of date and may not reflect the current reality on the ground!
Now, look for corroborating clues in the aerial image. These may vary by country, but I have found these clues are helpful:
The markings on the road. The suspected one-way street in the image above has a stop line all across the width of the street. Notice how the crossing street has a half stop line indicating that this is a two way street.
Other useful markings are arrows and painted speed limits. Look for these close to intersections.
Another useful clue is the direction of parked cars. In some countries (like the U.K. and most states in the U.S.) it is not legal to park 'against traffic'. So if all cars are parked in one direction, as in the animation above, that gives you a solid clue.
The best clue of course is local knowledge. Start with areas you know well to gain some confidence and experience!
Next, download the data for the area. Before you add
oneway=yes though, check if it applies to the entire way. The OSM way may be longer than the segment we suggest. This has to do with the way we internally process OSM data. We split the ways at each intersection. You may need to split the way before you apply the
(Above) This OSM way may need to be split.
Because we split ways into shorter segments, the opposite may also happen. The
oneway segment may extend beyond what the plugin suggests. This may be because we don't have enough trips through all segments to be sure.
Another thing to watch out for is the directionality of the OSM way. If the direction of the way in OSM (the order of the nodes, basically) is the opposite of the
oneway direction, you either need to tag the way with
oneway=-1 or reverse the direction of the way first.
(Above) The direction of the OSM way (selected, red) is different from the suggested
After you make the
oneway improvements, upload the changeset with
trafficflowdirection in the source.
Finally, mark the issue as Closed. Do this by first making the TrafficFlowDirection layer active and selecting the issue you just solved:
Then click the green lock in the plugin panel, add a comment, and close the issue.
If you find that after inspecting the aerial image or your local knowledge, the way is really not one-way, you can mark the issue as Invalid instead, using the red exclamation mark icon in the plugin panel.
We define three confidence levels for the suspected Traffic Flow Direction errors. These levels are based on different thresholds for the total number of trips and the percentage going of trips going in one direction. Clicking on the 'filter' icon in the Traffic Flow Direction panel will reveal a filter dialog that lets you narrow down the visible errors:
You can also use the filter dialog to switch between Open, Solved and Invalid errors.
You can comment on the selected issue by clicking the blue text bubble icon in the plugin panel:
Perhaps you want to use a different OSM editor. Or you just want to browse around? This is what we created the Traffic Flow Direction Web tool for.
The tool is similar to the Missing Roads web tool. It will show a heatmap at lower zoom levels, and individual errors at higher zoom levels. It allows for filtering by status and confidence level. If you are zoomed in far enough, 'Edit in...' buttons will appear.
I hope you find this useful! I would really like to hear what you think about the tool, this manual, and our efforts to make our data more open. Let me know at email@example.com or comment below.
Thank you and happy mapping!