Making Clouds Go Away on MapBox Satellite

April 01 2013 by Charlie Loyd

Chris and I have been working on new techniques to make cloudless, seamless satellite composites. Today I’d like to show you how we’ve been applying these methods to make a new moderate-resolution imagery layer.

We start with images from MODIS, a set of two cameras on NASA’s Terra and Aqua satellites. For more than a decade, they’ve photographed nearly the entire earth twice a day, so it’s a wealth of data. The problem is that if you stitch a day of MODIS images together, you get something like this:

MODIS Terra composite for March 28th, 2013. Images: NASA

MODIS Terra composite for March 28th, 2013. Images: NASA LANCE-MODIS.

It’s lovely as a work of art, but it wouldn’t make a very good base layer for a map about anything other than weather. Besides clouds, it has black zones of missing data between satellite passes and in the polar night, plus sun-glints across the equator.

The traditional approach to de-clouding would be to find each region’s clearest days in a large set of images, by hand or automatically, and quilt them together. Unfortunately, this leaves seams – adjacent images may clash (for example, if they’re from different seasons) and draw attention to the base layer in a way that a mapper rarely wants.

We’ve been working on code that takes many years of images at once, looks at individual pixels instead of large regions, and outputs the average of all their clearest days. I could talk your ear off about the technical details, but the upshot is simple – we get cloudless images without seams!

We’ve put more than two terapixels of MODIS data into this processing pipeline so far, and we’ve just started getting useful output. It’s even more attractive than we’d expected, and we want to give you a sneak peek.

Adelaide, Australia (latitude −34.9, longitude 138.6)

Adelaide, Australia (latitude −34.9, longitude 138.6) with Gulf St Vincent and Spencer Gulf to the west, the dry bed of Lake Gairdner to the northwest, and cropland and the Danggali Wilderness Area to the northeast.

The eastern end of the Black Sea (latitude 42, longitude 40)

The eastern end of the Black Sea (latitude 42, longitude 40). The southern shore is Turkey; to the east are Armenia and Georgia. To the north, past the Caucasus mountains, is Russia – including the resort town of Sochi, which will host the 2014 Winter Olympics. The ring-like pattern in the sea is the Batumi Eddy, a circulating current rich in phytoplankton.

Baffin Island, in the Canadian arctic (latitude 67, longitude −75)

Baffin Island, in the Canadian arctic (latitude 67, longitude −75). The marsh in the central south of this view is Dewey Soper Migratory Bird Sanctuary, the largest goose colony in the world.

Manaus, Brazil (latitude −3, longitude −60)

On the left is Manaus, Brazil (latitude −3, longitude −60), the economic capital of the central Amazon basin. To its north and east, on the north side of the Amazon, the small orange patches are the exposed soil of bauxite (aluminum) mines. On the south side of the Amazon are networks of logging roads.

Winnipeg, Canada (latitude 49.9, longitude −91.1

Winnipeg, Canada (latitude 49.9, longitude −91.1), south of lakes Winnipeg and Manitoba. The faint transition parallel to the bottom edge of this image near the left side is the US–Canada border, with different mixes of crops popular on either side. To the north and east, agriculture fades out as the Canadian Shield’s landscape becomes less hospitable.

This is all still work in progress – we can’t wait to release the finished layer.