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

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
  
  
==Working steps==
+
=Working steps=
# Preparing raster data (Converting DN to reflectance)
+
==Preparing raster data (Converting DN to reflectance)==
## Load the multiband raster file ''Subset_S2A_MSIL2A_20170619T.tif'' available in the [[Course data|course data]]. This contains all 13 bands of Sentinel-2 scene.
+
# Load the multiband raster file ''Subset_S2A_MSIL2A_20170619T.tif'' available in the [[Course data|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.
+
# 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 {{typed|text=Raster calculator}} into the search field to find the {{button|text=GDAL\OGR --> Raster calculator}} tool and open it.
+
# In the processing toolbar, type {{typed|text=Raster calculator}} into the search field to find the {{button|text=GDAL\OGR --> Raster calculator}} tool and open it.
 
* Click the button {{button|text=Run as batch process...}}, and use {{button|text=Add row}} [[Image:Add_rows.PNG]] button to add enough processing rows.
 
* Click the button {{button|text=Run as batch process...}}, and use {{button|text=Add row}} [[Image:Add_rows.PNG]] button to add enough processing rows.
 
* Click the button {{button|text=...}} of '''Input layer A''' to select the single extracted bands as input layers (i.e. one per row).
 
* Click the button {{button|text=...}} of '''Input layer A''' to select the single extracted bands as input layers (i.e. one per row).
Line 13: Line 13:
 
* Click the button {{button|text=...}} of '''Calculated''' to save output file
 
* Click the button {{button|text=...}} of '''Calculated''' to save output file
 
* 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
 +
 
 +
 
 +
==Defining classification inputs in SCP-plugin==
 +
 
 +
 
 
[[Category:QGIS Tutorial]]
 
[[Category:QGIS Tutorial]]

Revision as of 01:26, 26 November 2017


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


Defining classification inputs in SCP-plugin

Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export