By: Jinal Foflia
Clifford Snow is on a mission to personally add the most up-to-date road data (including rural logging roads) of Washington state to OpenStreetMap. Clifford started contributing to OpenStreetMap in 2011 after seeing a presentation by Hurricane Coast at LinuxfestNW in Bellingham, Washington. I wanted to learn more about the project’s origins and the map’s technical framework, so I sat down with him to chat about his work.
What inspired you to develop the project?
Heavily trafficked roads in major US metropolitan areas are usually maintained regularly and in good shape in OpenStreetMap. The conditions of rural roads in the US are a different story. In Washington state, for example, some of them are still in the same condition as when they were imported into maps from TIGER data. With this project I wanted to provide the OSM mapping community with more up-to-date, comprehensive, basemaps for tracing road data.
What datasets did you use to build the map?
A majority of counties in Washington State like Island County, Whatcom County, and my own Skagit County opened up their road data. This allowed me to trace roads and capture street names. As I expanded to more and more counties I ran into a roadblock: not all Washington Counties make open data available. I created a webmap showing which counties in Washington State have open data.
At times, providing open data is cost prohibitive for a small county, while other counties choose to monetize their data. Thankfully, I found a workaround using the Washington State Department of Transportation (WSDOT) open datasets of local and state roads.
Washington State is home to thousands of miles of logging roads. I relied on USFS data to record logging roads, and it was a massive dataset. Before this project, I never used Mapbox but I knew many Mapbox-ers from my work on previous OpenStreetMap projects and thought it may be a good solution.
Mapbox made it easy for me to get the road network maps online and could scale to handle a larger load than I could from my home Geoserver.
Can you walk us through how you built the map?
I started by plotting out how to upload the large datasets onto the Mapbox server. The data I had resided in my PostGIS server. I needed to convert it to an MBTile and upload it to Mapbox. Getting it into an MBTile wasn’t hard. Uploading it because of the size was much more difficult for me. Fortunately, Mapboxer Sam Mathews helped out, pointing me to a script to help with the process. I built a shell script wrapper to help out.
Once I figured that out, I plowed ahead and began to build the basemap layer. Here’s how I did it:
- First I loaded the shapefile into PostGIS, using PostGIS to filter and simplify the data. The state’s data contained many fields that were not needed since I was only looking for street and highway names.
- I used QGIS to load the PostGIS data to save the data as a geojson. Loading into QGIS gave me a nice visual of the data to make sure it looks correct.
- Tippecanoe helped me convert the geojson into an MBTile file for the upload to Mapbox.
- The Mapbox-upload script was used to send the data up to Mapbox.
- Once the MBTiles were accepted, which takes a while with a large file size, I used the Mapbox Studio editor to create the road style.
- Then, I published the style in Studio. Mapbox Studio made it easy to create styles at different zoom levels.
- Finally, I add the newly published basemap layer to the OpenStreetMap Wiki. JOSM adds entries directly into the list of images available. This step involves creating (or copying in my case) the boundary of the area the data covers, adding the URL and icon to displayed in JOSM. I’m optimistic that the iD editor will allow adding custom overlays in the near-future.
What’s next for the project? Are there other Mapbox features you plan to explore?
I’d really like to see open road data from the states displayed as a basemap in our editors. That is going to require scripting to grab the data, normalizing it, convert it to MBTiles and then uploading to Mapbox. One obstacle I envision is getting updates at different times.
I plan to start working on this project this fall.
Learn more about how we’re supporting projects like this one on our Community page. Explore the full basemap layer, and start adding OSM data to your own mapping project — read our guide.
How I built it: mapping every road in Washington state was originally published in Points of interest on Medium, where people are continuing the conversation by highlighting and responding to this story.