Skip to content
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

Snow mask from S2 #5

Open
christianbriese opened this issue Jul 7, 2022 · 1 comment
Open

Snow mask from S2 #5

christianbriese opened this issue Jul 7, 2022 · 1 comment

Comments

@christianbriese
Copy link

@Bart92 Del10: p29 could we use the snow mask from S2 (Level 2A Scene Classification) in order to retrieve separate class for permanent snow? otherwise in the map add white for no data (see SRR3: RID-86)

@Bart92
Copy link
Contributor

Bart92 commented Jul 7, 2022

To implement this we would need to :

  • Store the result of predict_random_forest in a variable instead of writing it out to a netCDF
  • Design a callback that defines whether a pixel contains permanent snow or not from the SCL layer (for example, if 80% of dates selected by the user is classified as snow in a certain pixel in the SCL layer, it should be classified as permanent snow. The output of this could be binary (0 for false, 1 for true)
  • Store the SCL layer in a separate band and apply this callback using reduce_dimension on the time dimension
  • Merge the output of that procedure with the output of the predict_random_forest method
  • Do another reduce_dimension this time on the band dimension with an if / else, if array_element(1) == 1 then return value greater than any of the outputs of predict_random_forest (e.g. 99), else return array_element(0) (the predict_random_forest prediction)
  • Write the final result out to file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants