Tracing Landsat 8 for OpenStreetMap

July 18 2013 by Charlie Loyd

Want to help update OpenStreetMap with fresh, free Landsat 8 imagery? Here’s how to get started tracing whatever interests you, even if you’ve never edited OpenStreetMap before.

Start by finding a place where OSM needs attention to relatively large features – Landsat imagery’s strength is on things like highways, coastlines, and rivers. One of my favorite spots is the Amazon basin. Following the Landsat 8 downloading and processing instructions blogged earlier, I’ve loaded a relatively clear scene of an area in northern Brazil into TileMill. (One note on the processing: it can help with tracing to boost the imagery’s brightness and contrast. For example, on this scene I used -sigmoidal-contrast 100x11% instead of -sigmoidal-contrast 50x16%. Do whatever works best.)

I like to add raster-scaling: lanczos; to the image style for smoother scaling, but just as with the color adjustment, you’re free to adjust as you see fit. Now we’ll export the image through the menu in the top left right of TileMill, choosing Upload:

In the export screen, you can crop to the general area of the scene that you’re interested in. Be sure to render down to zoom level 15 – though Landsat 8 isn’t perfectly crisp at that resolution, it works really well for tracing:

After you upload – which may take a few minutes if you’ve chosen a large area or if you’re on a slower internet connection – you can visit your map on mapbox.com:

Notice the part of the URL that has your username, a dot, and the name of the map. (If you didn’t give the map a short name in TileMill, it may be randomly generated gibberish – don’t worry.) That’s the map ID, in this case char.amzn-tracing. You can also find it under the mapbox.js tab of the Publish interface on the site. Now we’ll make a URL template that tells mapping code where to fetch the image tiles for your map. To do that, simply replace my map ID with yours in this URL:

https://tiles.mapbox.com/v3/ + account.mapid + /{z}/{x}/{y}.png

We’re almost there! Open the iD editor, and if you don’t have an OSM account, sign up for one now and work through the iD demo – it’s speedy and painless. Find your way to the area you’ll be tracing in iD, open the Background menu (the top item in the left-hand sidebar), choose Custom, and paste the URL template:

By the way, notice the background brightness setting (red highlight) – if you find your imagery a little too bright or dark, adjust that. Zoom in on your new Landsat 8 layer, and you’re ready to trace:

Save your work often! With each save, OpenStreetMap will be a little bit better than it was before, and MapBox Streets will be serving the updated river (or lake, mining operation, glacier – whatever you’ve chosen) within minutes.

One big advantage of Landsat over other open imagery is that it arrives so often. Even when it isn’t the sharpest view of a particular region, it can be sushi-fresh. This makes it especially important for features like streams, glaciers, and vegetation, which can change quickly – for worse, like rainforest logging, or better, like river restoration. Interpreting the tremendous flow of open data into timely open information is a big job, but OSM shows it’s possible.