Polygonizes a raster and adds the values in the raster stack to a data frame in list column runoff_ts.

raster_to_HS(
  rasters,
  unit,
  date,
  timestep = NULL,
  aoi = NULL,
  names = NULL,
  verbose = FALSE
)

Arguments

rasters

A raster object, or a list of raster objects, or a list of URIs to files readable by raster package.

unit

Unit of the timeseries, coercable with units::set_units().

date

Date of the first layer in raster, or a vector of dates with the length of layers in raster, or a list of vectors of dates, corresponding to the dates in each raster layer.

timestep

Length of timestep in raster. Currently supporting "hour", "day", "month". Only needed if date is not a vector of dates.

aoi

Area of interest as an 'sf' polygon object, 'SpatialPolygons', or 'SpatialPolygonsDataFrame'. Optional, but recommended for all applications.

names

A name (names) for the runoff timeserie(s).

verbose

Print progress indication or not.

Value

See create_HS.