Observing landscape changes from space

Generating time-lapses from satellite imagery in Python

Blaz Sovdat
Jan 25, 2018 · 3 min read

Written by Anze Zupanc, Matej Aleksandrov, Matej Batič, Devis Peressutti, and Blaz Sovdat.

The Sentinel-2 satellite mission involves twin satellites orbiting the Earth in tandem, with phase of 180 degrees. This translates into revisit time of five days at the equator; as one moves towards the poles revisit time decreases. High revisit frequency of Sentinels adds another dimension to satellite imagery — time. We’ve become used to still images of stunning landscapes from all over the world. But being able to observe from space how landscapes change in time — either due to our influence or natural causes — is something new.

Generating time-lapses from scratch

Our Sentinel Hub services have offered this capability for quite a while, however, creating time-lapses from scratch requires a lot of manual work.

Beijing Daxing International Airport.

First, we have to retrieve the set of dates for which data of the area of interest (henceforth abbreviated AOI) are available. Our OpenSearch API is the way to achieve this. The API allows us to filter out images whose cloud coverage exceeds user-set threshold.

Second, once we’ve retrieved the list of available dates, we download an image for each date. This is done via a WMS or WCS request.

But now another issue pops up: as of this writing, the filter in OpenSearch uses the cloud coverage that was estimated over the whole tile (these estimates are provided by ESA). This means that while the tile might have low cloud coverage, our AOI — in general covering only a small fraction of the whole tile — could be almost completely covered by clouds. And vice versa — while the tile might have high cloud coverage, our AOI might be almost cloudless.

One way to alleviate this problem is to use a custom cloud detector to estimate the cloud coverage of the AOI on the fly. We use our recently released cloud detector to solve this problem.

The time-lapse script

We are happy to announce that the sequence of dull steps we’ve just outlined is completely automated by our time-lapse Python module which uses the open-source sentinelhub-py package to interact with Sentinel Hub services and sentinel2-cloud-detector package to estimate cloud coverage of the retrieved scenes.

Using the module

To use the module you need Python 3.5+ installation and instance ID associated with your Sentinel Hub account. If you don’t have an account, you can create a free trial one.

Time-lapse examples

Grand Ethiopian Renaissance Dam

The Grand Ethiopian Renaissance Dam is a gravity dam on the Blue Nile River. Its construction began in 2011 and as of this writing the dam is still under construction. When completed, it will be the largest hydroelectric power plant in Africa.

The Grand Ethiopian Renaissance Dam on the Blue Nile River, Ethiopia.

Mandrare River

The Mandrare River in southern Madagascar dries up in certain months of the year, as seen in the time-lapse.

Mandrare River, Madagascar.

Sevilla rice fields

The following time-lapse shows rice fields in Sevilla in false color.

Rice fields in Sevilla.

Utah Mine Fields

In Moab desert in Utah, water is pumped underground to dissolve the potash ore into a brine. Highly-concentrated brine is then pumped into the evaporation ponds shown in the following time-lapse. As darker water absorbs more sunlight, the water is dyed bright blue to reduce the amount of time it takes for the potash to crystallize.

Brine potash evaporation fields in the Moab Desert, Utah.

Sentinel Hub Blog

Stories from the next generation satellite imagery platform

Thanks to Matej Batič, Devis Peressutti, Matej Aleksandrov, Anze Zupanc, Marko Repse, and Grega Milcinski

Blaz Sovdat

Written by

Sentinel Hub Blog

Stories from the next generation satellite imagery platform

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade