Announcement: All noncommercial projects registered to use Earth Engine before April 15, 2025 must verify noncommercial eligibility to maintain Earth Engine access.
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."],[[["Calculates the distance from each zero-valued pixel to the nearest non-zero pixel in a specified direction."],["Returns a single-band image (\"distance\") containing these calculated distances as floating point values."],["Allows specifying the search angle, maximum search distance, and an optional label band for multi-band images."]]],["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"]]