geetools.algorithms.distanceToMask#

geetools.algorithms.distanceToMask(image, kernel=None, radius=1000, unit='meters', scale=None, geometry=None, band_name='distance_to_mask', normalize=False)#

Compute the distance to the mask in meters.

Parameters:
  • image (ee.Image) – Image holding the mask

  • kernel (ee.Kernel) – Kernel to use for computing the distance. By default uses euclidean

  • radius (int) – radius for the kernel. Defaults to 1000

  • unit (str) – units for the kernel radius. Defaults to ‘meters’

  • scale (int) – scale for reprojection. If None, will reproject on the fly (according to EE lazy computing)

  • geometry (ee.Geometry or ee.Feature) – compute the distance only inside this geometry. If you want to compute the distance inside a clipped image, using this parameter will make the edges not be considered as a mask.

  • band_name (str) – name of the resulting band. Defaults to ‘distance_to_mask’

  • normalize (bool) – Normalize result (between 0 and 1)

Returns:

A one band image with the distance to the mask

Return type:

ee.Image