Land Cover/Use Classification using the Semi-Automatic Classification Plugin for QGIS
From AWF-Wiki
(Difference between revisions)
Line 14: | Line 14: | ||
* Click {{button|text=Run}} | * Click {{button|text=Run}} | ||
− | # Follow [[Create stack]] to create a multiband raster file from the converted single bands from step 3 | + | # 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== | ==Install and set up SCP plugin== | ||
# Click {{mitem|text=Plugins --> Manage and Install Plugins}} | # Click {{mitem|text=Plugins --> Manage and Install Plugins}} | ||
− | # Type in the search bar {{typed|text=semi-Automatic Classification}}, click on the plugin name and then on {{button|text=Install plugin}} | + | # Type in the search bar {{typed|text=semi-Automatic Classification}}, click on the plugin name and then on {{button|text=Install plugin}}. |
[[File:SCP_plugin_intall.png]] | [[File:SCP_plugin_intall.png]] | ||
+ | * Right-click on the {{button|text=Plugin Toolbar}} and make sure the following are checked {{button|text=SCP Dock}}, {{button|text=SCP Edit Toolbar}}, {{button|text=SCP Tools}} and {{button|text=SCP Working Toolbar}}. | ||
+ | [[File:SCP_Tool.png]] | ||
==Defining classification inputs in SCP-plugin== | ==Defining classification inputs in SCP-plugin== |
Revision as of 11:05, 26 November 2017
Contents |
Working steps
Preparing raster data (Converting DN to reflectance)
- Load the multiband raster file Subset_S2A_MSIL2A_20170619T.tif available in the course data. This contains all 13 bands of Sentinel-2 scene.
- 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.
- 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 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).
- 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
- Click the button ... of Calculated to save output file
- Click Run
- 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
- Click Plugins --> Manage and Install Plugins
- Type in the search bar semi-Automatic Classification, click on the plugin name and then on Install plugin.
- Right-click on the Plugin Toolbar and make sure the following are checked SCP Dock, SCP Edit Toolbar, SCP Tools and SCP Working Toolbar.