Spectral indices
From AWF-Wiki
(Difference between revisions)
(→Vegetation index using the Raster Calculator) |
(→Vegetation index using Processing Toolbox) |
||
Line 12: | Line 12: | ||
** To finish, click {{button|text=Apply}} (see '''Fig. A'''). | ** To finish, click {{button|text=Apply}} (see '''Fig. A'''). | ||
− | = | + | = Spectral indices using Processing Toolbox = |
− | A convenient module for calculating spectral indices can be found in the QGIS processing | + | A convenient module for calculating one or several spectral indices at the same time can be found in the QGIS processing toolbox. |
− | + | * Type text=Radiometric}} into the search field and find the {{button|text=OTB --> Feature Extraction --> Radiometric Indices)}} tool. | |
− | + | * Open it with a double click. | |
− | + | * Assign the bands in the multiband file to the correct spectral sensitivity. | |
− | + | * Type {{typed|text=Vegetation:NDVI}} {{button|text=Enter}}, {{typed|text=Water:NDWI}} {{button|text=Enter}} , {{typed|text=Soil:BI2}} {{button|text=Enter}} in the tex field ''Available Radiometric Indices''. {{button|text=Run}}. | |
[[File:Qgis_radio_index.png|left|200px]] | [[File:Qgis_radio_index.png|left|200px]] | ||
Revision as of 14:47, 17 November 2018
Vegetation index using the Raster Calculator
- Click the Open Data Source Manager and then Add raster layer 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:
- 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.
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 text=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.
- Type Vegetation:NDVI Enter, Water:NDWI Enter , Soil:BI2 Enter in the tex field Available Radiometric Indices. Run.
Spectral indices using OTB graphical user interface
If you want to calculate several spectral indices and stack the resulting layers into a new multiband file use the OTB Graphical User Interface.
- In the Search box on the Windows Start menu type OSGeo4W Shell. You should be able to open the shell by clicking on it.
- Type into the shell: otbgui_RadiometricIndices. Select a multiband input file and assign the spectral ranges to the bands as seen in the screenshot.
- In the Documentation tab you'll find an overview on available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input image. Several Indices can be selected in the drop-downlist. Note, the rank of marking defines the order of bands in the resulting multiband file. Mark SAVI, NDWI and BI2 in the list.
- Display the output multiband spectral indices image as a color composite in the canvas (Fig. B).