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.

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.

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_B00MaskFeature and select Export>SaveFeatureas 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.