I'm trying to combine 2 raster layers using gdal_calc in order to use them in QGIS 3.8.
One of the condition that has to be met could be translated as "if the value of raster A is 1 and the value of raster B is either 10 or 11 or... or 800 (I've got 20 different values or so), then keep the value of raster B".
I managed to achieve what I wanted using several logical_and :
logical_and(A==1,B==10)*B + logical_and(A==1,B==11)*B + ... + logical_and(A==1,B==800)*B
But it's tedious to write and hard to read for other users. Is there a way to get the same result using a more compact syntax ? I tried using
But neither of these gave me the same result as my previous lengthy expression...