Terrain-Correction layover shadow computed outside the subset

The layover shadow mask in Terrain-Correction is created over the entire Sentinel-1 image regardless of the subset. This is apparent when using a small DEM covering an AOI since these errors will persist: “Cannot create layover/shadow mask due to the absent of DEM”. When this occurs the layover shadow mask is all zeros. The solution is to have a much larger DEM covering the entire image. This is a similar post.

This is also apparent when using auto-downloaded DEMs. Running this graph with Terrain-Correction saveLayoverShadowMask=false, and then running with it set to true.

The subset is specified as the n01w074 geocell (yellow). Running with false correctly downloads n01w074 and the 8 surrounding geocells (orange). Then running again with true downloads 8 additional geocells (dark green) that are required to cover the entire area of the outlined scenes (outlined black).

There are 2 issues here: There is undesired additional processing being performed beyond the specified subset, and when running with a small DEM, production of layover shadow mask results in a file of zeros.

The 2 slices used for this example are: