I'm a developer but this is the first experience with python and QGIS Plugin, I want make a plug-in for Remote Sensing Index.
I have followed this basic tutorial https://www.youtube.com/watch?v=ZI3yzAVCK_0 and in this moment I have one dropdown with layer selection.
I correctly loaded the layer but I want see only the raster layer with multiple band for raster calculation, is it possible to filter it?
After at item selection from the dropdown list, load the band in other dropdown list for right association (green, blue, red, RedEdge ,Near IR).
Is it possible to make? What is the class prop to read?
This is almost the UI
Best Answer
Hopefully the following will help get you started, I've added comments to try and explain how it works.
Essentially, you can use a QgsMapLayerComboBox to filter out all layers loaded in QGIS and only have it list the multiband rasters. You can then define a function which will read the selected layer and populate the combo boxes for the bands (note that I only added the standard red, green and blue bands):
Result: