modis_watermask: Create Dynamic Watermask

modis_watermaskR Documentation

Create Dynamic Watermask

Description

Function to create a dynamic watermask for a point in time based on previous watermaps. The function uses floodmaps from previous dates to determine areas that were covered by water in at least x% of the time. This can help to deal with issues of non-bimodality.

Usage

modis_watermask(
  date = NULL,
  filenames = NULL,
  filedates = NULL,
  years = 5,
  threshold = 0.99
)

Arguments

date

date. Date for which a watermask should be calculated

filedates

dates vector. Dates which the above floodmaps represent

years

numeric. Number of years that should be considered to create a watermask

threshold

numeric. Needs to be between 0 and 1. How often (relative frequency) a pixel needs to be inundated in the past x years to be considered in the watermask

floodmaps

character vector. Filenames of all floodmaps that already exist

Value

SpatialPolygons of the waterask


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