公告:凡是在
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 | 使用磁滯。雖然不夠精確,但可能會生成更出色的圖片。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間: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. |"]]