modis_percentiles: Calculate Reflectance Percentiles

modis_percentilesR Documentation

Calculate Reflectance Percentiles

Description

Function to calculate percentiles of water and dryland reflectance values

Usage

modis_percentiles(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() in case you want to create dynamic watermasks.

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

dataframe of percentiles

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 percentiles
modis_percentiles(modis)

## End(Not run)

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