Mapillary Ambassador Nuno teaches you how to use Mapillary to enhance road data in OpenStreetMap, including turn restrictions, speed limits and bumps, turning lanes, traffic signs, and sidewalk information.

This post was originally published in his OSM Diary.

After seeing the diary of how to use Mapillary to add building attributes on the state of San Francisco buildings, I decided to create this article on how to use Mapillary as a tool to improve OSM road data. This article will focus on how to use Mapillary traffic sign detection to implement turn restrictions, and Mapillary imagery to add lane value and turning lanes. I won’t get into how to capture Mapillary images using smartphones or action cams, as you can find that information on the Mapillary website and you can request a car or bike mount for your smartphone to facilitate capturing.

(Please note that from my experience, after uploading the photos to Mapillary, the traffic sign detection can take from 24 to 96 hours to be processed and being displayed on the map.)

Editor used: JOSM. JOSM plugins needed: Mapillary, RoadSigns, Turnlanes-tagging, Turnrestrictions.

Open JOSM, go to EDIT and then pick PREFERENCES . Once in the options, head to the PLUG-INS menu and search and install these four plug-ins: Mapillary (for being able to use Mapillary imagery and “Mapillary object layer”); RoadSigns (if you want to add traffic signs to OSM); Turnlanes-tagging (for being able to add turning lanes); Turnrestrictions (to create turn restrictions on intersections).

To make thematic editing easier, head to VIEW/Map Painting Style and select Map Paint Preferences . Scroll until you find lane and road attributes by Martin Vonwald, select it, and send it to the right using the arrow and then click OK .

Head back to VIEW/Map Painting Style and select LANE AND ROAD ATTRIBUTES ; using this layer it will be easier to check the current attributes on the OSM data (notice the number of lanes and lanes direction being displayed).

Pick a location with Mapillary photos that you or others have gathered. Go to IMAGERY and select Mapillary and Mapillary object layer (the traffic signs will be shown on the map and the green dots represent the Mapillary photos; you can turn off the layer if it seems like too much information for you.

Here is the Mapillary object layer with detected traffic signs.

Case 1: adding turn restrictions

At this intersection you see below it's mandatory to go straight (notice that the there's a traffic sign on the Mapillary photo layer, which means that a traffic sign has been detected in that photo; if you pick that photo on the map (turns it into orange), the photo will be displayed and you can see the sign in the photo).

Let's add the turn restriction to the OSM data (notice, make sure to split the lines in every intersection or when there are different attributes). First, select the from line and then press the CONTROL key on your keyboard and select the to line.

On TURNRESTRICTION , click on Create a new turn restriction ; a menu will pop up with the road names. In this case, pick Straight Only and click OK .

Turn off both Mapillary layers and you'll notice a Straight only sign appears on the Data Layer . Submit the changes to OSM.

Case 2: adding speed limits and bumps

Notice the traffic sign with the speed limit of 40 that has been detected on the Mapillary object layer.

Let's create a node in that line, move the node to where the traffic sign is located, and press P to split the line. On the right, pick +add on the tag and enter the maxspeed and its value.

Add a bump. Check the detected bump sign by Mapillary.

Create a node in the line where the bump is (notice, bump signs are located 50 meters or less before the actual bump, so make sure to click on Next picture on the Mapillary photo preview until you visualize the actual bump).

Go to the menu and go through PRESETS/HIGHWAYS/WAYPOINTS/TRAFFIC CALMING and pick BUMP .

The bump has been added, submit the changeset to OSM.

Case 3: adding turning lanes

Notice the lane turn restrictions detected by Mapillary (on the left one it is mandatory to go left and the right lane, turn left or go straight).

Let’s use the Turnlanes plug-in to add the data to OSM. First, select the line, then ALT+SHIFT+2 : the plug-in menu will pop up. Add the number of lanes, in this case 2, and the mandatory turning lanes (left lane goes left, right lane goes left or straight).

Click OK . Notice how useful the lane and road attributes by Martin Vonwald is to visually display the data you just added. Submit the changeset to OSM.

Case 4: adding traffic signs

Here is a Give way sign detected by Mapillary.

Create a node in the line, select it, go to PRESENTS/TRAFFIC SIGNS and pick the sign.

A menu will pop up, asking the location of the sign and in which direction it applies.

Apply and notice that the traffic sign is now added (you can clearly spot it as it has a white background, which does not occur with the Mapillary object layer that is transparent).

Case 5: adding sidewalk information

By navigating through Mapillary imagery, you can add sidewalk attributes.

Notice on the Mapillary photo that after the intersection, there's a sidewalk only on the right side of the way.

Select the line before the intersection and add the tag sidewalk:both . Select the line after the intersection and add the tag sidewalk:right .

As you can see with the Lane and road attributes paint style, you are now able to see the sidewalk attributes.

By implementing this workflow, we can assure high-quality road data on OSM and the best data for routing.

I advise you, if you have a strong local community of mappers, to have a similar approach as Chetan did and use the OSM Task Manager to better organize: collecting Mapillary photos; adding the data to OSM; validating.

A similar approach can be used to add street names, house numbers, fire hydrants, or POI (like stores, bars, etc.) if you capture photos on Mapillary with the camera pointed sideways instead of forward.

If you use OsmAnd, I recommend that you check the tutorial on how to add Mapillary overlay, so you can calculate your route to capture new sequences of streets that aren’t on Mapillary yet.

Hope it helps, capture photos with Mapillary and enhance OSM with them.

Happy mapping!

/Nuno