| modis_classify | R Documentation | 
Function to classify MODIS MCD43A4 band 7 into the binary categories water and dryland. Classification is based on the algorithm described in Wolski et al., 2017 and requires that reflectance values of water- and dryland are sufficiently distinct. The final map binarily depicts water = 1 and dryland = 0.
modis_classify(
  x = NULL,
  watermask = NULL,
  drymask = NULL,
  ignore.bimodality = F
)
| x | 
 | 
| watermask | 
 | 
| drymask | 
 | 
| ignore.bimodality | logical. Should issues with bimodality be ignored, i.e. the bimodality check be skipped? This can lead to biased classifications but may help in detecting issues. | 
RasterLayer of classified MODIS image. water is valued 1,
dryland valued 0. If there are clouds, they are masked as NA.
## Not run: 
# Download files for two dates
files <- modis_download(
    dates     = c("2020-01-01", "2020-01-01")
  , outdir    = getwd()
  , tmpdir    = tempdir()
  , username  = "username"
  , password  = "password"
  , overwrite = F
)
# Load one of them
modis <- modis_load(files[1])
# Classify it
classified <- modis_classify(modis, ignore.bimodality = T)
# Visualize
plot(classified)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.