modis_bimodal: Check for Bimodality in MODIS Data

modis_bimodalR Documentation

Check for Bimodality in MODIS Data

Description

Function to check for bimodality in MODIS MCD43A4 band 7. Bimodality is said to be achieved if peaks of water- and dryland reflectances are sufficiently distinct. For details check Wolksi et al. 2017.

Usage

modis_bimodal(x = NULL, watermask = NULL, drymask = NULL)

Arguments

x

RasterLayer of MODIS band 7

watermask

SpatialPolygons or SpatialPolygonsDataFrame representing the water-polygon that is used to extract reflectances of water on MODIS band 7. By default the masks from Wolski et al., 2017 are used. See also modis_watermask().

drymask

SpatialPolygons or SpatialPolygonsDataFrame representing the dryland-polygon that is used to extract reflectances of water on MODIS band 7. By default the masks from Wolski et al., 2017 are used.

Value

logical indicating if the image is bimodal (TRUE) or not bimodal (FALSE)

Examples

## Not run: 
# Download file
file <- modis_download(
    dates     = "2020-01-01"
  , outdir    = getwd()
  , tmpdir    = tempdir()
  , username  = "username"
  , password  = "password"
  , overwrite = F
)

# Load it
modis <- modis_load(file)

# Check for bimodality
modis_bimodal(modis)

## End(Not run)

DavidDHofmann/floodmapr documentation built on Jan. 15, 2024, 9:32 p.m.