I am working to produce a snow duration map in GEE, but since the area of interest is mountainous I am having trouble with north-facing slopes. I've learned that a solution exists for Sentinel in this answer: https://gis.stackexchange.com/a/305159/147843

Is there an equivalent for Landsat?

  • This is not equivalent to cloud shadow, but is rather a parallax sun-angle issue. This is why you orthorectify imagery in rugged terrain. And, yes it is common to orthorectify Landsat but, you will have to research GEE solutions, if any. – Jeffrey Evans Aug 15 at 14:45

I'we been lead to an easy solution that may be useful to other users.

GEE provides the function ee.Terrain.hillShadow that allows to produce a band with 1 where the pixel is illuminated and 0 when it is in the shade, using a DEM. Then you just have to mask your image using the shadowmap.

Here is how i used it:

var image= ee.Image("LANDSAT/LT05/C01/T1_SR/LT05_195028_19841230")
var SRTM=ee.Image("USGS/SRTMGL1_003");
var elevation=SRTM;

var visu={bands:['B3','B2','B1'],min:0, max:3000};

var shadowMap=ee.Terrain.hillShadow(elevation, image.get('SOLAR_AZIMUTH_ANGLE'), image.get('SOLAR_ZENITH_ANGLE'),200,true).focal_median(2).reproject(elevation.projection());
Map.addLayer(image.updateMask(image.select("shadow")),visu,'sun part');
Map.addLayer(image.updateMask(image.select("shadow").not()),visu,'shadow part');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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