I am trying to detect cloud shadows in Landsat images. I came up with producing good shadows and cloud masks. Now I'd like to implement my cloud mask adding cloud shadows.
Do You have a good idea to do that?
OPTION 1: I thought combining the two masks I have to be a good idea, but I would need an oriented buffer to do that, given that I know the solar azimuth. I found a How to create an oriented buffer using arcpy? with a super good explanation, but I have no idea how to translate the R prototype code provided there into Python (which I use), as I have too few programming skills.
Does anybody know how to deal with this (maybe @whuber himself who provided the code)?
OPTION 2: As I know sun azimuth and angle (from .MTL file of Landsat), I thought to be a good idea to create a fake DEM with the cloud mask inside. Clouds would have their elevations as value in the DEM. Then I would cast the shadows against this "fake DEM" to obtain my cloud shadow mask (or to "play with" it and my shadow mask). Anyway, I don't know a good way to estimate cloud elevations, and, having tried with 5000, 8000, and 10000 meters values with very poor results, I am not totally convinced this is the best method.