How does one negate a ".and()" operation on an image in GEE if this image does not contain 0/1 values but NULL/1 values?
From the documentation:
not() - Returns 0 if the input is non-zero, and 1 otherwise. Arguments: this:value (Image): The image to which the operation is applied. Returns: Image
For example if I want to retreive all loss in the Hansen tree loss dataset that does not overlap with a tree cover density >= 30. I use this code:
var gfw = ee.Image('UMD/hansen/global_forest_change_2018_v1_6'); var tc = gfw.select('treecover2000'); var loss = gfw.select('loss'); var lossyear = gfw.select('lossyear'); var frst = tc.gte(30); var not_overlapping_loss = lossyear.and(frst.not())
which works fine. But when I try the same code replacing "frst" by an "asset" I uploaded that contain only "NULL/1" values, it seems the resulting image contains only NULL values as the (not existing) 0's are never converted to 1's...