Build a file-backed raster from a collection of file names and dates.

build_bulk_file(files, filename, read_i_raster = NULL, layer_prefix = "lyr")

Arguments

files

data frame with `fullname` and `date`

filename

database of files, see Details

read_i_raster

function to read the i-th file

layer_prefix

optional prefix to give each layer, pre-pended to the date

Value

RasterBrick

Details

The files collection must have columns `fullname` with the path to the file, and `date` with a valid date or date-time. The function `read_i_raster` takes an integer and the files collection and returns the raster read from the i-th row. The date is set on the object after this function returns, to ensure it matches the database of files, and also so that the raster function can be used as a fallback.