<div dir="ltr"><div><div>Hi,<br><br></div>I have a multiband raster layer 'myraster.jp2'. Now I want to build a model in the graphical model builder, with as user input the raster layer, and the raster calculator to compute the NDVI.</div><div><br></div><div>Suppose I have the multiband raster layer loaded in QGIS as 'myraster', then I can use the following expression in the raster calculator:</div><div><br></div><div>"myraster@1"+"myraster@2"</div><div><br></div><div>This works when the name of the raster is 'hard coded', but what if I want the user to select the layer (or file) when running the model?</div><div><br></div><div>I can add a 'raster layer' to the model, and use that as input in the raster calculator. That will show up in the layer selction box of the map calculator. When selecting that, it shows in the expression box as:</div><div><br></div><div>"<qgis._core.QgsProcessingModelChildParameterSource object at 0x0000023D82087948>@1"</div><div><br></div><div>See screenshot: <a href="https://www.dropbox.com/s/g1o5ikxufkordkq/screenshot.png?dl=0">https://www.dropbox.com/s/g1o5ikxufkordkq/screenshot.png?dl=0</a></div><div><br></div><div>Running a model with this as input in the raster calculator results in an empty raster layer.</div><div><br></div><div>Any idea how I can use raster calculator in the model builder whereby the raster layer can be selected by the user?</div><div><br></div><div>Best wishes,</div><div><br></div><div>Paulo<br></div><div><br></div><div><br></div></div>