I have created a band where cloud pixels are set as NaN. Is there a way to create a new band where a buffer of pixels that are, for example, 10 pixels away from a cloud pixel (so NaN) is added so I get a band where both clouds and the buffer are set as NaN?
if you have a binary mask of your clouds where 0 is cloud and 1 is non-cloud, you can apply a minimum filter with 3x3 pixels and repeat it ten times.
Shouldn’t a minimum filter with a NxN kernel, where N=2*buffersize+1, do the job at once?
basically yes. But you cannot define a buffer larger 7x7 in the standard filter options.
i see. that’s a pity, though. considering the high resolution of S2 data, i guess, it’s not that rare that users want larger filter kernels. your iteration suggestion is a nice workaround indeed.