SCL ValueDescriptionQualityweight
1Saturated or defectiveBad\(w_{min}\)
2Dark Area PixelsBad\(w_{min}\)
3Cloud ShadowsBad\(w_{min}\)
4VegetationGood\(w_{max}\)
5Bare SoilsGood\(w_{max}\)
6WaterGood\(w_{max}\)
7Clouds Low Probability / UnclassifiedGood\(w_{max}\)
8Clouds Medium ProbabilityMarginal\(w_{mid}\)
9Clouds High ProbabilityBad\(w_{mid}\)
10CirrusGood\(w_{mid}\)
11Snow / IceBad\(w_{mid}\)
qc_sentinel2(SCL, wmin = 0.2, wmid = 0.5, wmax = 1)

Arguments

SCL

quality control variable for sentinel2

wmin

Double, minimum weigth (i.e. weight of snow, ice and cloud).

wmid

Dougle, middle weight, i.e. marginal

wmax

Double, maximum weight, i.e. good

References

https://developers.google.com/earth-engine/datasets/catalog/COPERNICUS_S2_SR

Examples

qc_sentinel2(1:11)
#> $QC_flag
#>  [1] "cloud"    "cloud"    "cloud"    "good"     "good"     "good"    
#>  [7] "good"     "marginal" "cloud"    "good"     "snow"    
#> 
#> $w
#>  [1] 0.2 0.2 0.2 1.0 1.0 1.0 1.0 0.5 0.2 1.0 0.2
#>