-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i.sentinel.mask: returncode error #85
Comments
H vero, Steps:
System description:
|
Yes, I forgot to mention (actually I didn't think it was relevant then) that the error arises when setting the computational region to a subset of the full scene. If I, like you, run the process for the full scene, then it finishes without problems. Do you think the reported problem is just something particular to that region subset or something more general for the module that won't work for scene subsets? |
Just a wild guess: The problem might be that there are no clouds or shaddows in the smaller region? @veroandreo : could you try to delete |
I have just tested the module setting as region and it works fine. Is it possible that you choose a region in which the module does not detect clouds or more probably shadows?
|
Actually, the other way around... Within the subset there was only one shadow (red) identified and a couple of clouds (blue) with their respective shadows that were missed (area in the square). This is the region setting I was using (Iguazú falls area in case you wonder :))
@RobiFag could such cases be considered somehow easily within the module? |
So only a shadow is detected in your computational region and no clouds. |
Maybe I have understood..in Vero's case some clouds are detected but are then removed by the cleaning geometries procedure (remove small areas). Actually there was a check in the code about the detected clouds but it considered only the temporary vector cloud map and not the cleaned one. Moreover the if statement regarding the cloud check was removed (a82876e#diff-86a1994a46407a9b6bd9d1b786d7869fL378-R389) This is a possible code side solution:
In this way Vero's case ends without error but with the warning message 'no clouds detected
Maybe you can try with smaller cloud and shadow thresholds! |
[skipping the rest]
Why no shadow mask computed? What if, like in this case, only cloud shadow is present in the scene or region subset? Are shadows dependent on finding clouds first then?
Right! I have not modified them. Which is the unit of these thresholds? Square meters? If yes, we could add that in the description of the options to make it clearer |
The shadow mask, in this case, is not computed since the cloud mask is mandatory for shadow mask creation. In fact, the cloud map is used during the cleaning phase of the shadow mask in order to remove misclassifications (see the manual for further details about the algorithm of cloud and shadow detection). Regarding the thresholds, the unit is square meters (v.clean - tool=rmarea). |
I have already made some changes to the code (see #86 ). Now the computation of the shadow mask is independent of the clouds mask. If no clouds are detected, the shadow mask is computed but the procedure of cleaning misclassifications from shadow is not performed. |
Sounds good to me! Thanks for such a prompt response and all the explanations :) |
Can the ticket be closed with this PR merged: |
Yes, I think so. Thanks again both of you 😊 |
Name of the addon
i.sentinel.mask
Describe the bug
When using the module to mask clouds and cloud shadows in a S2 scene, I get the following error:
To Reproduce
Steps to reproduce the behaviour:
System description (please complete the following information):
The text was updated successfully, but these errors were encountered: