ee.Terrain.hillShadow
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Tạo một dải bóng, với đầu ra là 1 khi các pixel được chiếu sáng và 0 khi các pixel bị đổ bóng. Lấy đầu vào là một dải độ cao, phương vị và thiên đỉnh của nguồn sáng theo độ, kích thước vùng lân cận và có áp dụng độ trễ hay không khi bóng xuất hiện. Hiện tại, thuật toán này chỉ hoạt động cho phép chiếu Mercator, trong đó các tia sáng song song.
Cách sử dụng | Giá trị trả về |
---|
ee.Terrain.hillShadow(image, azimuth, zenith, neighborhoodSize, hysteresis) | Hình ảnh |
Đối số | Loại | Thông tin chi tiết |
---|
image | Hình ảnh | Hình ảnh mà bạn muốn áp dụng thuật toán đổ bóng, trong đó mỗi pixel phải biểu thị độ cao tính bằng mét. |
azimuth | Số thực dấu phẩy động | Phương vị tính bằng độ. |
zenith | Số thực dấu phẩy động | Thiên đỉnh tính bằng độ. |
neighborhoodSize | Số nguyên, mặc định: 0 | Quy mô của vùng lân cận. |
hysteresis | Boolean, mặc định: false | Sử dụng trễ. Ít chính xác về mặt vật lý, nhưng có thể tạo ra hình ảnh đẹp hơn. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]