公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Image.directionalDistanceTransform
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
对于来源中的每个零值像素,获取指定方向上距离最近的非零像素。
返回一个浮点距离波段,称为“距离”。
用法 | 返回 |
---|
Image.directionalDistanceTransform(angle, maxDistance, labelBand) | 图片 |
参数 | 类型 | 详细信息 |
---|
此:source | 图片 | 源图片。 |
angle | 浮点数 | 搜索非零像素的角度(以度为单位)。 |
maxDistance | 整数 | 搜索的最大距离(以像素为单位)。 |
labelBand | 字符串,默认值:null | 如果提供,则允许使用多频段输入,并且仅使用此频段进行搜索。系统会返回所有其他波段,并使用在标签波段中搜索到的非零像素处的每个波段的值填充这些波段。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\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. |"]]