公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ee.Terrain.hillShadow
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
创建阴影带,其中像素被照亮时输出为 1,像素被遮挡时输出为 0。以高程带、光源的方位角和天顶角(以度为单位)、邻域大小以及在出现阴影时是否应用迟滞为输入。目前,此算法仅适用于光线平行的墨卡托投影。
用法 | 返回 |
---|
ee.Terrain.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\u003eCalculates shadowing on terrain based on elevation, light source direction, and neighborhood size, outputting a binary image (1 for illuminated, 0 for shadowed).\u003c/p\u003e\n"],["\u003cp\u003eTakes an elevation image as input, along with azimuth and zenith angles of the light source, and optional parameters for neighborhood size and hysteresis.\u003c/p\u003e\n"],["\u003cp\u003eAssumes a Mercator projection where light rays are parallel and currently only supports this projection.\u003c/p\u003e\n"],["\u003cp\u003eOffers control over shadow detection accuracy with neighborhood size and hysteresis for potential trade-offs between physical accuracy and visual quality.\u003c/p\u003e\n"]]],[],null,["# ee.Terrain.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.Terrain.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. |"]]