After seeing the diary of how to use Mapillary to add building attributes on The state of San Francisco buildingsi 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, Mapillary imagery to add lane value and turning lanes. I won’t get into how to capture Mapillary images using smartphone or action cams, as you can find that information on Mapillary website check here and you can request a car or bike mount for your smartphone here
(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 three plug-ins: Mapillary (for being able to use Mapillary imagery and “Mapillary object layer”); RoadSigns (if you want to add the traffic signs to OSM); Turnlanes-tagging (for being able to add turning lanes); Turnrestrictions (to create turn restrictions on intersections).
To make a 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 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 are the Mapillary photos, you can turn off the layer if its too much information for you to handle.
Mapillary object layer with the detected traffic signs:
Adding turn restrictions
In this intersection 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 was 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.
Lets add the turn restriction to the OSM data (notice, make sure to split the lines in every intersection or when there’s different attributes): First select the “from” line and then press CONTROL key on your keyboard and select the “to” line.
On the 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 notice a Straight Only sign appears on the Data Layer. Submit the changes to OSM.
Adding speed limits and bumps
Notice the traffic sign with the speed limit of 40 that was detected on the Mapillary object layer.
Lets pick create a node in that line and move the node to where the traffic sign is located and press “P” to split the line. On our 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 changeset to OSM.
Adding turning lanes
Notice the lane turn restrictions detected by Mapillary (left one 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 changeset to OSM.
Adding traffic signs
Give way sign detected by Mapillary
Create a node in the line, select it, go to PRESENTS/TRAFFIC SIGNS/pick the sign
Menu will pop up, asking the location of the sign and in which direction does it apply.
Apply and notice 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).
Adding sidewalk information:
By navigating through Mapillary imagery you can add the sidewalk attributes.
Notice on the Mapillary photo that after the intersection, there's only sidewalk on the right side of the way.
Select the line before the intersection and add the a tag with “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 sidewalks 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 a OSM Task Manager to better organize: Collecting Mapillary photos; Adding the data to OSM; Validating.
Similar approach can be used to add street names, house numbers, fire hydrants or POI (like stores, bars, etcetera) if you capture photos on Mapillary with the smartphone pointed to the sideways instead of forward.
If you use OSMand, I recommend you to check how to add Mapillary overlay, so you can calculate your route to capture new sequences of streets that aren’t on Mapillary
Hope it helps, capture photos with Mapillary and improve OSM with them.