RadiometricIndices description files for QGIS Processing
Hi,
I was trying to use RadiometricIndices application inside QGIS Processing, but the indices are missing from the description file:
RadiometricIndices|out
Compute radiometric indices.
Feature Extraction
QgsProcessingParameterRasterLayer|in|Input Image|None|False
QgsProcessingParameterRasterDestination|out|Output Image
QgsProcessingParameterNumber|channels.blue|Blue Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.green|Green Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.red|Red Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.nir|NIR Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.mir|Mir Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterString|list|Available Radiometric Indices|None|True
*QgsProcessingParameterEnum|outputpixeltype|Output pixel type|uint8;int;float;double|False|2|True
Looking at this issue, I don't know if it is easy to implement the 'Available Radiometric Indices' parameter as a multiple selection window (maybe the best approach), but as a workaround before a better approach to be implemented, could be to use OTBParameterChoice for the 'list' parameter:
OTBParameterChoice|list|Available Radiometric Indices|Vegetation:NDVI;Vegetation:TNDVI;Vegetation:RVI;Vegetation:SAVI;Vegetation:TSAVI;Vegetation:MSAVI;Vegetation:MSAVI2;Vegetation:GEMI;Vegetation:IPVI;Vegetation:LAIFromNDVILog;Vegetation:LAIFromReflLinear;Vegetation:LAIFromNDVIFormo;Water:NDWI;Water:NDWI2;Water:MNDWI;Water:NDTI;Soil:RI;Soil:CI;Soil:BI;Soil:BI2;BuiltUp:ISU|0|True
RadiometricIndices|out
Compute radiometric indices.
Feature Extraction
QgsProcessingParameterRasterLayer|in|Input Image|None|False
QgsProcessingParameterRasterDestination|out|Output Image|None|False
QgsProcessingParameterNumber|channels.blue|Blue Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.green|Green Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.red|Red Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.nir|NIR Channel|QgsProcessingParameterNumber.Integer|1|True
QgsProcessingParameterNumber|channels.mir|Mir Channel|QgsProcessingParameterNumber.Integer|1|True
OTBParameterChoice|list|Available Radiometric Indices|Vegetation:NDVI;Vegetation:TNDVI;Vegetation:RVI;Vegetation:SAVI;Vegetation:TSAVI;Vegetation:MSAVI;Vegetation:MSAVI2;Vegetation:GEMI;Vegetation:IPVI;Vegetation:LAIFromNDVILog;Vegetation:LAIFromReflLinear;Vegetation:LAIFromNDVIFormo;Water:NDWI;Water:NDWI2;Water:MNDWI;Water:NDTI;Soil:RI;Soil:CI;Soil:BI;Soil:BI2;BuiltUp:ISU|0|True
*QgsProcessingParameterEnum|outputpixeltype|Output pixel type|uint8;int;float;double|False|2|True
This way, RadiometricIndices only output one index at a time, to a single band raster. However, QGIS Processing can run the algorithms in batch, and so, it can solve several/all the indices in just one step, but for individual single band rasters, which is not necessarily worst in my point of view.
What do you think?
Best regards, Pedro Venâncio