0

I am trying to use the pre-built function of GEE for calculating the slope of the terrain, but I cannot really understand how the function works, since the documentation is also not really helpful.

Can anyone provide an explanation about its mechanism? For example, which kind of formula it uses to extract the slope from a DEM.

1 Answer 1

0

You can directly use a DEM stored in GEE like the SRTM DEM.

var dem = ee.Image("CGIAR/SRTM90_V4");
var slope = ee.Terrain.slope(dem);
1
  • While this shows how to implement the function, the question is asking how the function works. I.e. the algorithm or formula it uses to arrive at its output. The only information in the documentation is that "The local gradient is computed using the 4-connected neighbors of each pixel", which is vague and, as the question says, not very helpful.
    – Matt
    Commented May 25, 2023 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.