Cloud Masking, Image Mosaic, and Land Cover Change Location

This tutorial is about the use of SCP for the assessment of land cover change. It is recommended to complete the Tutorial 2: Cloud Masking, Image Mosaic, and Land Cover Change Location before this tutorial.

The purpose of this tutorial is to locate land cover change over one year (between 2017 and 2018), using free Sentinel-2 images.

Following the video of this tutorial.


1. Download the Data

We are going to download a Sentinel-2 Satellite image (Copernicus land monitoring services) and use the bands illustrated in the following table.

Sentinel-2 BandsCentral Wavelength [micrometers]Resolution [meters]
Band 2 - Blue0.49010
Band 3 - Green0.56010
Band 4 - Red0.66510
Band 5 - Vegetation Red Edge0.70520
Band 6 - Vegetation Red Edge0.74020
Band 7 - Vegetation Red Edge0.78320
Band 8 - NIR0.84210
Band 8A - Vegetation Red Edge0.86520
Band 11 - SWIR1.61020
Band 12 - SWIR2.19020

Start QGIS and the SCP . Open the tab Download products clicking the button  in the Home, or in the SCP menu. In the tab Download products click the button  to display the OpenStreetMap tiles (© OpenStreetMap contributors) in the QGIS map, licensed as CC BY-SA (Tile Usage Policy ).
In general it is possible to define the area coordinates clicking the button  , then left click in the map for the UL point and right click in the map for the LR point. In this tutorial the study area is Rome (Italy), therefore click in the map to define the search area, or alternatively, enter these point coordinates in Search parameters:
  • UL: 12.4 / 41.9
  • LR: 12.5 / 41.8
The purpose of this tutorial is to map the land cover change between 2017 and 2018, therefore we need to download at least two images. Because of cloud cover, we are going to download an additional image for 2016, which will be used to replace pixels covered by clouds in the first image. We are searching for three images (tile 33TTG) acquired on:
  • 01 January 2017
  • 10 February 2017
  • 10 February 2018
Therefore, we need to perform three searches. Select Sentinel-2 from the Products  and set:
  • Date from: 2017-01-01
  • to: 2017-01-01
In this case, enter L1C_T33TTG in Filter to filter the results only for the tile 33TTG.

Search products

Now click the button Find  and after a few seconds the image will be listed in the Product list. Click the item in the table to display a preview that is useful for assessing the quality of the image and the cloud cover.

Search result

Repeat the date definition and the search also for the 2017-02-10 image. You can notice that there are a few clouds over the area, therefore we are going to mosaic this image with the one acquired on 2017-01-01.

Search result of second image

Finally, repeat the search for the 2018-02-10 image.

Search results

We can also select the bands to be downloaded according to our purpose. In particular, select the tab Download options and check only the Sentinel-2 bands that will be used in this tutorial and the ancillary data.

Download options

For the purpose of this tutorial, uncheck the option  Only if preview in Layers because we want to download and preprocess all the images listed in the table.
Before starting the download we need to set the preprocessing options in the tab Sentinel-2 for preforming the DOS1 Correction. Check the options  Apply DOS1 atmospheric correction and  Add bands in a new Band set to automatically create a Band set for each image.

Preprocessing options

To start the image download, in the tab Download products click the button RUN  and select a directory where bands are saved (a new directory will be created for each image). The download could last a few minutes according to your internet connection speed. The download progress is displayed in a bar.
After the download, all the bands of all the Sentinel-2 images (© Copernicus Sentinel data 2018) are automatically loaded in the map. We can also display the RGB color composite of the Band sets clicking the list RGB= in the Working toolbar, and selecting the item 3-2-1.

Download of Sentinel-2 bands

2. Create the cloud cover mask

Before the land cover change assessment, we need to remove cloud cover pixels in the image acquired on 2017-02-10. Of course we could perform the same process for all the other images.
In QGIS, load the file MSK_CLOUDS_B00.gml that should be inside the directory L1C_T33TTG_A008556_20170210T100132_2017-02-10 . This vector file represents most of the cloud cover in the image. In QGIS Layers Panel, left click the vector MSK_CLOUDS_B00 MaskFeature and select Export > Save Feature as to save this gml file to shapefile (e.g. clouds.shp).
We can convert this vector file to raster using the tab Vector to raster.
Click the button  to refresh the layer list, and select the vector clouds. Check the  Use constant value to set the raster value 1 for clouds. Also, in Select the reference raster select the name of a band. This will create a raster with the same size and aligned to the Sentinel-2 image. Finally click the button RUN  to create the mask.

Vector to raster mask

We could also improve the mask by manually editing the pixel of the raster using the tool Edit raster or creating a semi-automatic classification of clouds.

3. Mask clouds in the Sentinel-2 image

We are going to mask all the pixels covered by clouds in all the bands composing the Band set of the image acquired on 2017-02-10.
In the tab Cloud masking, set the number of the 2017-02-10 Band set in Select input band set. In Select the classification we select the mask created at the previous step. Enter 1 in Mask class values. Finally, uncheck Use buffer of pixel size to speed up the masking process.
Now click the button RUN  to select the output directory and start the masking process.

Mask clouds

4. Mosaic the Sentinel-2 images

We are going to mosaic the 2017 images in order to create a cloud free image to be used for land cover change.
We use the image acquired on 2017-01-01 to fill the gaps in the 2017-02-10 image. In the tab Band set, add a new Band set with the button  and add the masked bands.

New Band set

Now we can mosaic the 2017 images.
In the tab Mosaic of band sets, in the Band set list enter the number of the 2017-02-10 masked Band set, followed by comma, followed by the number of the 2017-01-01 Band set. Now click the button RUN  to select the output directory and start the masking process.

Mosaic Band sets

We could have used more than 2 Band sets. The process automatically mosaic the corresponding bands of the input Band sets filling the NoData gaps of the first Band set with the pixels of the following Band sets. The mosaic bands are automatically added to the map.

Mosaic of 2017 images

5. Land cover change

We are going to automatically locate the land cover change between the image mosaic of 2017 and the 2018 image.
SCP includes a tool that allows for calculating the spectral distance between every corresponding pixel of two Band sets, and creating a raster of changes through a spectral distance threshold.
In the tab Band set, add a new Band set with the button  and add the mosaic bands.

New Band set

In the tab Spectral distance, set the number of the 2017 mosaic Band set in Select first input band set, and set the number of the 2018 Band set in Select second input band set. In Distance algorithm check the  Spectral Angle Mapping. Check the  Distance threshold and set the value 10 that is the threshold used for creating the raster of changes.
Now click the button RUN  to select the output directory and start the masking process.

Spectral distance

After a while, the spectral distance raster and the raster of changes are added to the map

Raster of changes

This is an automatic method for locating land cover changes. We can see that most land cover changes are due to crop variations.
For instance, this method could be useful to assess vegetation burnt area or forest logging. We could set a different threshold value for increasing or reducing the number of pixels identified as changes.
Of course, in order to identify the type of land cover change we should identify the land cover classes of the images through photo-interpretation or with semi-automatic classification.

For any comment or question, join the Facebook group and the Google+ Community about the Semi-Automatic Classification Plugin.

Newer posts Older posts