ee.Algorithms.Terrain
Calculates slope, aspect, and a simple hillshade from a terrain DEM.
Expects an image containing either a single band of elevation, measured in meters, or if there's more than one band, one named 'elevation'. Adds output bands named 'slope' and 'aspect' measured in degrees plus an unsigned byte output band named 'hillshade' for visualization. All other bands and metadata are copied from the input image. The local gradient is computed using the 4-connected neighbors of each pixel, so missing values will occur around the edges of an image.
Usage | Returns |
---|
ee.Algorithms.Terrain(input) | Image |
Argument | Type | Details |
---|
input | Image | An elevation image, in meters. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["Calculates slope, aspect, and hillshade from a Digital Elevation Model (DEM) image."],["Outputs derived bands named 'slope' and 'aspect' in degrees, and 'hillshade' for visualization, while retaining other bands and metadata."],["Employs a 4-connected neighborhood for gradient computation, leading to potential missing values along image edges."],["Requires an input image containing either a single elevation band in meters or a multi-band image with an elevation band named 'elevation'."],["Accessible via the `ee.Algorithms.Terrain(input)` function, returning a processed image."]]],["The function processes an elevation image (in meters) to compute and add three new bands: 'slope' (degrees), 'aspect' (degrees), and 'hillshade' (unsigned byte). It calculates the local gradient using the four directly connected neighboring pixels. Missing values will occur around image edges due to the four-connected neighbor method. The input image's other bands and metadata are preserved. The function takes an elevation image as input and returns a processed image.\n"]]