Spectral indices
From AWF-Wiki
(Difference between revisions)
(→Spectral indices using Processing Toolbox) |
|||
Line 1: | Line 1: | ||
− | = | + | = Spectral vegetation index using Raster Calculator = |
* Click the {{button|text=Open Data Source Manager}} [[Image:QGIS_3.0_datasource.png|30px]] and then {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file ''/geodata/lucc/s2/Subset_S2A_MSIL2A_20170619T_MUL.tif''. | * Click the {{button|text=Open Data Source Manager}} [[Image:QGIS_3.0_datasource.png|30px]] and then {{button|text=Add raster layer}} [[Image:QGIS_2.0_addrast.png|20px]] and select the file ''/geodata/lucc/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]]). | * Check the rank and spectral range of bands in the multiband file (e.g. see table [[Changing Raster Layer Style]]). | ||
Line 12: | Line 12: | ||
** To finish, click {{button|text=Apply}} (see '''Fig. A'''). | ** To finish, click {{button|text=Apply}} (see '''Fig. A'''). | ||
− | = | + | = Several spectral indices at once 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. | A convenient module for calculating one or several spectral indices at the same time can be found in the QGIS processing toolbox. | ||
* Type {{typed|text=Radiometric}} into the search field and find the {{button|text=OTB --> Feature Extraction --> Radiometric Indices)}} tool. | * Type {{typed|text=Radiometric}} into the search field and find the {{button|text=OTB --> Feature Extraction --> Radiometric Indices)}} tool. | ||
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. | ||
* If you want to calculate a single spectral index type in the text field ''Available Radiometric Indices'': {{typed|text="Vegetation:NDVI"}} | * If you want to calculate a single spectral index type in the text field ''Available Radiometric Indices'': {{typed|text="Vegetation:NDVI"}} | ||
− | * If you want to calculate several spectral indices at | + | * If you want to calculate several spectral indices at once and store them in a multiband file click {{button|text=Help}} to find definitions of available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input multiband image. |
* Click {{button|text=Run}}. | * Click {{button|text=Run}}. | ||
* In the text field ''Available Radiometric Indices'' type with apostrophs: | * In the text field ''Available Radiometric Indices'' type with apostrophs: |
Revision as of 10:42, 17 November 2020
Spectral vegetation index using Raster Calculator
- Click the Open Data Source Manager and then Add raster layer and select the file /geodata/lucc/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.
Several spectral indices at once 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.
- If you want to calculate a single spectral index type in the text field Available Radiometric Indices: "Vegetation:NDVI"
- If you want to calculate several spectral indices at once and store them in a multiband file click Help to find definitions of available spectral indices in three categories (vegetation, water, soil) and relevant channels of the input multiband image.
- Click Run.
- In the text field Available Radiometric Indices type with apostrophs:
"Vegetation:NDVI Water:NDWI2 Soil:BI2"