OpenStreetMap

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:

josm-example

I will walk you through installation, basic operation and some mapping tips in the next paragraphs. Happy mapping!

Installation

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:

install

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:

segment-drawing

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 oneway.

Usage

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:

balloon-party

(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:

zooming-in

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:

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:

stop-mark

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.

cars-parked

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 oneway tag.

longway

(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.

opposite

(Above) The direction of the OSM way (selected, red) is different from the suggested oneway direction.

After you make the oneway improvements, upload the changeset with trafficflowdirection in the source.

upload

Finally, mark the issue as Closed. Do this by first making the TrafficFlowDirection layer active and selecting the issue you just solved:

activate

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.

Filtering

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 filter-icon in the Traffic Flow Direction panel will reveal a filter dialog that lets you narrow down the visible errors:

filtering-anim

You can also use the filter dialog to switch between Open, Solved and Invalid errors.

Commenting

You can comment on the selected issue by clicking the blue text bubble icon in the plugin panel:

comment

Web tool

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.

webtool

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 martijnv@telenav.com or comment below.

Thank you and happy mapping!

Discussion

Comment from gileri on 5 November 2015 at 00:34

Thank you for both the plugin and this great manual !

I added a link in the wiki page about the plugin toward your guide.

Comment from JLZIMMERMANN on 5 November 2015 at 06:15

Great job. I’m still wondering if GPS application are doing calculations including stps & lights trafiic to give proposals to faster ways. I used a lot GSPnav and it seems not be working yet like this. This is for me the bigged improvement for micromapping and beter calculations.

What do you think about ?

Jean-LOuis :-)

Comment from 25or6to4 on 5 November 2015 at 06:59

Another great tool! Two things to mention.

First, when I complete a one-way piece, and mark it either solved or invalid, then zoom back out, the orange circles are remaining intact and not clearing.

Second, I’m still confused as to what the green arrow is for. Would you mind elaborating a bit more on it.

Thanks again!

Comment from TheDutchMan13 on 5 November 2015 at 08:11

Thank you so much!

Comment from mvexel on 6 November 2015 at 19:33

gileri - Thanks for adding the link to the wiki and adding the manual to the wiki :)

J-Louis - In Scout, we definitely take into account the historic speed profiles. Actually, they are more important in navigation than the actual maxspeed tags, because they tell us how much time it actually takes on average to traverse a segment of road, rather than theoretically based on speed limits. Because this information changes continually and is not independently verifiable, it is not suitable for adding to OSM.

25or6to4 - thanks for reporting the cluster dot issue, we will look into it for sure, that is annoying. The green quickly copies the lon,lat to the clipboard, we thought it may be useful to paste the coordinates in some other application. We may remove it if it’s not useful or confusing.

TheDutchMan13 - I dig your avatar :D

Comment from muralito on 9 November 2015 at 13:24

Thanks fot the tools. Both missingRoads and TrafficeFlowDirection are very useful.

In the webapp, the option box Tile Status(open solved invalid), is to filter the display of some tiles, or to change the tile status as the user reviewed it?

Comment from highbuilder on 10 November 2015 at 03:22

Hi, I just found your nice tool and used it a couple of time in Switzerland. Do you know if this data also comes from the Scout Navigation app wich used to be the skobbler app? That would be nice to know, because sometimes it looks like it is Data from one single use who has driven the same way 50 times. Thanks!

Log in to leave a comment