Get mosaicked or merged raster from multiple MODIS hdf files.
Arguments
- path
character. Full list of hdf file paths. preferably a recursive search result from
base::list.files
.- date
character(1). date to query. Should be in
"YYYY-MM-DD"
format.- subdataset
character(1). subdataset names to extract. Should conform to regular expression. See
base::regex
for details. Default isNULL
, which will result in errors. Users should specify which subdatasets will be imported.- fun_agg
Function name or custom function to aggregate overlapping cell values. See
fun
description interra::tapp
for details.- ...
For internal use.
Note
Curvilinear products (i.e., swaths) will not be accepted.
MODIS products downloaded by functions in amadeus
,
MODISTools,
and luna are accepted.
Examples
## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
## amount of data which is not included in the package.
if (FALSE) { # \dontrun{
mod09ga_merge <- process_modis_merge(
path =
list.files("./data", pattern = "MOD09GA.", full.names = TRUE),
date = "2024-01-01",
subdataset = "sur_refl_b01_1",
fun_agg = "mean"
)
} # }