ee.Image.directionalDistanceTransform

For each zero-valued pixel in the source, get the distance to the nearest non-zero pixels in the given direction.

Returns a band of floating point distances called "distance".

UsageReturns
Image.directionalDistanceTransform(angle, maxDistance, labelBand)Image
ArgumentTypeDetails
this: sourceImage

The source image.

angleFloat

The angle, in degrees, at which to search for non-zero pixels.

maxDistanceInteger

The maximum distance, in pixels, over which to search.

labelBandString, default: null

If provided, multi-band inputs are permitted and only this band is used for searching. All other bands are returned and populated with the per-band values found at the searched non-zero pixels in the label band.