Spectral indices

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(Spectral indices using Processing Toolbox)
(Spectral indices using Processing Toolbox)
Line 18: Line 18:
 
* Assign the bands in the multiband file to the correct spectral sensitivity.
 
* Assign the bands in the multiband file to the correct spectral sensitivity.
 
* in the text field ''Available Radiometric Indices'' type:
 
* in the text field ''Available Radiometric Indices'' type:
{{typed|text=Vegetation:NDVI}} {{button|text=Enter}}
+
{{typed|text=Vegetation:NDVI}}
{{typed|text=Water:NDWI}} {{button|text=Enter}}
+
{{typed|text=Soil:BI2}} {{button|text=Enter}}.
+
 
Click {{button|text=Run}}.
 
Click {{button|text=Run}}.
 
* Click {{button|text=Help}}to find an overview on available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input multiband image.
 
* Click {{button|text=Help}}to find an overview on available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input multiband image.
 
[[File:Qgis_radio_index.png|left|400px]]
 
[[File:Qgis_radio_index.png|left|400px]]
  
* Display the output multiband spectral indices image as a color composite in the canvas ('''Fig. B''').
+
* Display the output single band spectral index image in the canvas ('''Fig. B''').
 
{| class="wikitable"
 
{| class="wikitable"
 
| style="border: 0pt" | [[file:Qgis_ndvi_pseudo.png|thumb|left|400px|'''Figure A:''' Single band NDVI displayed with color table ''RdYlGn'']]
 
| style="border: 0pt" | [[file:Qgis_ndvi_pseudo.png|thumb|left|400px|'''Figure A:''' Single band NDVI displayed with color table ''RdYlGn'']]

Revision as of 15:50, 20 June 2019

Vegetation index using the Raster Calculator

  • Click the Open Data Source Manager QGIS 3.0 datasource.png and then Add raster layer QGIS 2.0 addrast.png and select the file /geodata_lab01/raster/s2/Subset_S2A_MSIL2A_20170619T_MUL.tif.
  • Check the rank and spectral range of bands in the multiband file (e.g. see table Changing Raster Layer Style).
  • After clicking Open, the raster layer appears in the QGIS canvas.
  • Click Raster --> Raster calculator.
  • A powerful normalization is realized by the normalized difference vegetation index that forms the basis of most vegetation indices $NDVI = (Nir - Red) / (Nir + Red)$. It can be implemented using Raster Calculator as seen in the following screenshot:

Qgis raster calc ndvi.png

  • Define path and file name of the output layer. OK.
  • Map visualization: Open the raster layer properties by right-clicking the ndvi raster in the TOC selecting Properties, or by simply double clicking.
  • Select the Style tab. Under Render type select Singleband pseudocolor.
    • Open the In the pulldown menu of Color ramp by clicking on Qgis pull down.png Select All color ramps --> RdYlGn. In the Mode select Equal interval. Set the number of Classes to 10 and click Classify.
    • To finish, click Apply (see Fig. A).

Spectral indices using Processing Toolbox

A convenient module for calculating one or several spectral indices at the same time can be found in the QGIS processing toolbox.

  • Type Radiometric into the search field and find the OTB --> Feature Extraction --> Radiometric Indices) tool.
  • Open it with a double click.
  • Assign the bands in the multiband file to the correct spectral sensitivity.
  • in the text field Available Radiometric Indices type:

Vegetation:NDVI Click Run.

  • Click Helpto find an overview on available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input multiband image.
Qgis radio index.png
  • Display the output single band spectral index image in the canvas (Fig. B).
Figure A: Single band NDVI displayed with color table RdYlGn
Figure B: Color composite of three spectral indices: RGB=NDVI, BI2, NDWI
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export