Land Cover/Use Classification using the Semi-Automatic Classification Plugin for QGIS

From AWF-Wiki
Revision as of 11:54, 26 November 2017 by K.awuah (Talk | contribs)

Jump to: navigation, search


Contents

Working steps

Preparing raster data (Converting DN to reflectance)

  1. Load the multiband raster file Subset_S2A_MSIL2A_20170619T.tif available in the course data. This contains all 13 bands of Sentinel-2 scene.
  2. Follow Split stack to extract bands 2, 3, 4, 5, 6, 7, 8, 11 and 12, using the multiband raster file Subset_S2A_MSIL2A_20170619T.tif as input layer.
  3. In the processing toolbar, type Raster calculator into the search field to find the GDAL\OGR --> Raster calculator tool and open it.
  • Click the button Run as batch process..., and use Add row Add rows.PNG button to add enough processing rows.
  • Click the button ... of Input layer A to select the single extracted bands as input layers (i.e. one per row).

Convert DN to reflectance.png

  • Enter and repeat the expression A/10000 under Calculation in gdalnumeric syntax using +-/* or any numpy array functions (i.e. logical_and()) and set Output raster type to Float32

Batch2.png

  • Click the button ... of Calculated to save output file
  • Click Run
  1. Follow Create stack to create a multiband raster file from the converted single bands from step 3 and load into QGIS canvas

Install and set up SCP plugin

  1. Click Plugins --> Manage and Install Plugins
  2. Type in the search bar semi-Automatic Classification, click on the plugin name and then on Install plugin.

SCP plugin intall.png

  • Right-click on the Plugin Toolbar and make sure the following are checked SCP Dock, SCP Edit Toolbar, SCP Tools and SCP Working Toolbar.

SCP Tool.png

Defining classification inputs in SCP-plugin

We need to define input image, training input and spectral signature files for SCP.

  1. Open the SCP Dock.
  2. Click SCP Dock --> SCP input --> Input image, use the button Refresh list Refresh list.PNG and the drop-down menu-bar to select the multiband Merge file (i.e. from DN to Reflectance conversion) as input image.
  3. Click the button Band set Band set.PNG to further define the input image
  4. Next, click Quick wavelength settings and select Sentinel-2 from the list in order to automatically set the Center wavelength for each band and the Wavelength unit (NB. required for spectral signature assessment)
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export