I have six raster layers that represent the probability of each pixel belonging to a specific vegetation type. I would like to use these to generate a new raster where the value of each pixel is the ID of the raster with the maximum value for the pixel, i.e. the most probable vegetation type of that pixel.
e.g. if at a given pixel raster1 = 0.5, raster2 = 0.2, raster3 = 0.1, raster4 =0.1, raster5=0.05 and raster6 = 0.05, then I would like that pixel in the new raster to be 1.
I can't work out how to do this either with the QGIS Raster Calculator (v2.18) or using an ifelse function with the SAGA Raster Calculator, but I am a bit of GIS newbie still.
In case it's relevant, Creating Maximum-Value Composite using QGIS? explains how to build a composite raster from maximum values but doesn't help me work out to extract the identity of the raster containing the maximum value.