Mapping deforestation with Sentinel Hub

Nicolas Karasiak
Jun 11, 2019 · 4 min read

Foreword by Sentinel Hub

This script by Nicolas Karasiak has won the second prize in the “Agriculture and Forestry” category of the Sentinel Hub Custom Script Contest. This post is part of a series of guest blog posts written by script authors, talking about some of their entries to our Custom Script Contest, giving some more insight in how the scripts are working and what can be achieved using them.

Mapping deforestation with Sentinel Hub

Forests are essential for wildlife, biodiversity and to fight climate change. Mapping the forest cuts and its amplitude may be a way to raise awareness in order to initiate change in personal habits.

Highlighted in red, the deforestation in Brazil between 2017 and 2018 (GitHub)

How does the script detect the forest cuts?

Avoiding clouds

The script gathers the three months since the selected date to compute the mean NDVI and compares this value to the mean NDVI of these same three months but from the previous year. When the NDVI drop is at least 0.25, then the script considers that there is certainly a cut. In order to avoid clouds when computing the NDVI, and as the forest has a very low reflectance in the blue band unlike the clouds, each date with blue pixel above 0.18 is dismissed.

The script uses the three months from the current scene and the same three months from the previous year to detect forest cuts.

Getting the needed data

The function getNeededDates retrieves the three months since the selected image and handles the situation when the three months are in two different years (if the user chooses an image from February for example):

How to avoid crops in the detection?

Forests are often confused with crops as the NDVI is high for both of these two vegetation types. The easiest solution found is to compute the mean NDVI for each of the 3 months in the previous year and to track when each month’s NDVI is above 0.7. Crops rarely last 3 months with the NDVI this high. This method is not perfect but it allows to avoid a lot of cultivated fields.

Detection of forest cut from 2017 to 2018.

Representing the cuts and its probability

Code to saturate in red the clear cut
Highlighted in red, the deforestation in Madagascar between 2017 and 2018 (GitHub)

Sentinel Hub Blog

Stories from the next generation satellite imagery platform