I'm trying to run the i.topo.corr
algorithm in the QGIS Python console, on a multi-band WorldView image. I'm still getting an error that the input value is incorrect. For this algorithm, the inputs are the bands on which the algorithm will be applied:
input: Name of reflectance raster maps to be corrected topographically
Parameter type: QgsProcessingParameterMultipleLayers
Accepted data types:
- list[str]: list of layer identifiers
- list[str]: list of layer names
- list[str]: layer source list
- list[QgsMapLayer]
- QgsProperty
According to the documentation (https://docs.qgis.org/3.4/en/docs/user_manual/processing/console.html#processing-console), the value for a multiple input is:
« Multiple input. The value is a string with input descriptors separated by semicolons (;
). As in the case of single layers or tables, each input descriptor can be the data object name, or its file path. Simply use a string with the name that identifies the data object to use (the name it has in the QGIS Table of Contents) or a filename. »
There is my code in QGIS Python console. I don't know how to refer to the bands of my image in the input parameter:
import processing
processing.run("grass7:i.topo.corr", {'INPUT': 'ImageName_band1';'ImageName_band2';'ImageName_band3',
'BASEMAP': 'Illumination_model_name',
'ZENITH': 69.7,
'METHOD': 2,
'OUTPUT': r'output_directory'})
I tried many thing for the bands in imput parameter: imageName.1, imageName_1, imageName@1, imageName_B1, etc.