ee.Image.distance

Computes the distance to the nearest non-zero pixel in each band, using the specified distance kernel.
UsageReturns
Image.distance(kernel, skipMasked)Image
ArgumentTypeDetails
this: imageImageThe input image.
kernelKernel, default: nullThe distance kernel.
skipMaskedBoolean, default: trueMask output pixels if the corresponding input pixel is masked.