geetools.Image.ImageAccessor.bufferMask#

geetools.Image.ImageAccessor.bufferMask(radius=1.5, kernelType='square', units='pixels')#

Make a buffer around every masked pixel of the Image.

The buffer will be made using the specified radius, kernelType and units and will mask surrounfing pixels.

Parameters:
  • radius (geetools.types.ee_int) – The radius of the buffer.

  • kernelType (geetools.types.ee_str) – The kernel type of the buffer. One of: square, circle, diamond, octagon, plus, square.

  • units (geetools.types.ee_str) – The units of the radius. One of: pixels, meters.

Returns:

The image with the buffer mask applied.

Return type:

ee.Image

Examples

import ee, geetools

ee.Initialize()

src = 'COPERNICUS/S2_SR_HARMONIZED/20200101T100319_20200101T100321_T32TQM'
image = ee.Image(src)
image = image.geetools.bufferMask(1.5, 'square', 'pixels')
print(image.bandNames().getInfo())