You can use the Raster Calculator
tool:

It is quite a generic and powerful tool, in your case the logic should be however pretty straightforward.
If your cover
layer (channel 1, hence cover@1
) has a value of 1 where you want to retain data from the LAI
layer (channel 1, hence LAI@1
) , and 0 where you want to discard them, the Expression could be very simple:
"cover@1" * "LAI@1"
(H/T Borgh)
If you want to create a mask (i.e. have null/empty pixels where cover
is zero) a kind of hack can come in handy:
"LAI@1"/("cover@1">0)
Explanation:
- if
cover
= 1 -> the output will be equal to LAI
- if
cover
= 0 -> the output would be LAI/0, which is impossible, thus the Raster Calculator returns a null value.
To avoid errors and artifacts, make sure both layers have the same reference system and resolution ;)