The angle, in degrees, at which to search for non-zero pixels.
maxDistance
Integer
The maximum distance, in pixels, over which to search.
labelBand
String, 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["\u003cp\u003eCalculates the distance from each zero-valued pixel to the nearest non-zero pixel in a specified direction.\u003c/p\u003e\n"],["\u003cp\u003eReturns a single-band image ("distance") containing these calculated distances as floating point values.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying the search angle, maximum search distance, and an optional label band for multi-band images.\u003c/p\u003e\n"]]],["The `directionalDistanceTransform` function calculates the distance from each zero-valued pixel in a source image to the nearest non-zero pixel along a specified angle. It returns an image containing these floating-point distances. The search is performed up to a maximum distance. Optionally, a specific band can be defined as the target for the search, while preserving the other bands with the values found at searched pixel locations.\n"],null,["# ee.Image.directionalDistanceTransform\n\nFor each zero-valued pixel in the source, get the distance to the nearest non-zero pixels in the given direction.\n\n\u003cbr /\u003e\n\nReturns a band of floating point distances called \"distance\".\n\n| Usage | Returns |\n|-------------------------------------------------------------------------|---------|\n| Image.directionalDistanceTransform`(angle, maxDistance, `*labelBand*`)` | Image |\n\n| Argument | Type | Details |\n|----------------|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `source` | Image | The source image. |\n| `angle` | Float | The angle, in degrees, at which to search for non-zero pixels. |\n| `maxDistance` | Integer | The maximum distance, in pixels, over which to search. |\n| `labelBand` | String, 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. |"]]