公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Algorithms.HillShadow
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建阴影带,其中像素被照亮时输出为 1,像素被遮挡时输出为 0。以高程带、光源的方位角和天顶角(以度为单位)、邻域大小以及在出现阴影时是否应用迟滞为输入。目前,此算法仅适用于光线平行的墨卡托投影。
用法 | 返回 |
---|
ee.Algorithms.HillShadow(image, azimuth, zenith, neighborhoodSize, hysteresis) | 图片 |
参数 | 类型 | 详细信息 |
---|
image | 图片 | 要应用阴影算法的图片,其中每个像素应表示以米为单位的海拔高度。 |
azimuth | 浮点数 | 方位角(以度为单位)。 |
zenith | 浮点数 | 天顶(以度为单位)。 |
neighborhoodSize | 整数,默认值:0 | 邻域大小。 |
hysteresis | 布尔值,默认值:false | 使用迟滞。虽然在物理上不太准确,但可能会生成更好的图片。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eGenerates a binary shadow map (1 for illuminated, 0 for shadowed) based on terrain elevation, sun position, and optional hysteresis.\u003c/p\u003e\n"],["\u003cp\u003eThe algorithm utilizes a neighborhood size parameter to determine shadowing and currently supports only Mercator projections with parallel light rays.\u003c/p\u003e\n"],["\u003cp\u003eInput elevation data should be in meters and sun position is defined by azimuth and zenith angles in degrees.\u003c/p\u003e\n"],["\u003cp\u003eHysteresis can be enabled to potentially improve visual results but may compromise physical accuracy.\u003c/p\u003e\n"]]],["The `HillShadow` algorithm generates a shadow band (1 for illuminated, 0 for shadowed pixels) for Mercator projections. It requires an elevation image, light source azimuth and zenith angles, and a neighborhood size. Hysteresis can be optionally applied for potentially improved visuals. The algorithm's inputs include the elevation image, azimuth (degrees), zenith (degrees), neighborhood size, and a boolean for hysteresis, outputting a shadow band image.\n"],null,["# ee.Algorithms.HillShadow\n\nCreates a shadow band, with output 1 where pixels are illumunated and 0 where they are shadowed. Takes as input an elevation band, azimuth and zenith of the light source in degrees, a neighborhood size, and whether or not to apply hysteresis when a shadow appears. Currently, this algorithm only works for Mercator projections, in which light rays are parallel.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------------------------------------------------|---------|\n| `ee.Algorithms.HillShadow(image, azimuth, zenith, `*neighborhoodSize* `, `*hysteresis*`)` | Image |\n\n| Argument | Type | Details |\n|--------------------|-------------------------|----------------------------------------------------------------------------------------------------------------|\n| `image` | Image | The image to which to apply the shadow algorithm, in which each pixel should represent an elevation in meters. |\n| `azimuth` | Float | Azimuth in degrees. |\n| `zenith` | Float | Zenith in degrees. |\n| `neighborhoodSize` | Integer, default: 0 | Neighborhood size. |\n| `hysteresis` | Boolean, default: false | Use hysteresis. Less physically accurate, but may generate better images. |"]]