View source: R/calculate_covariates_auxiliary.R
calculate_modis_daily | R Documentation |
The function operates at MODIS/VIIRS products on a daily basis. Given that the raw hdf files are downloaded from NASA, standard file names include a data retrieval date flag starting with letter "A". Leveraging that piece of information, the function will select files of scope on the date of interest. Please note that this function does not provide a function to filter swaths or tiles, so it is strongly recommended to check and pre-filter the file names at users' discretion.
calculate_modis_daily(
from = NULL,
locs = NULL,
locs_id = "site_id",
radius = 0L,
date = NULL,
name_extracted = NULL,
fun_summary = "mean",
max_cells = 3e+07,
geom = FALSE,
...
)
from |
SpatRaster. Preprocessed objects. |
locs |
SpatVector/sf/sftime object. Locations where MODIS values are summarized. |
locs_id |
character(1). Field name where unique site identifiers
are stored. Default is |
radius |
numeric. Radius to generate circular buffers. |
date |
Date(1). date to query. |
name_extracted |
character. Names of calculated covariates. |
fun_summary |
function. Summary function for
multilayer rasters. Passed to |
max_cells |
integer(1). Maximum number of cells to be read at once.
Higher values will expedite processing, but will increase memory usage.
Maximum possible value is |
geom |
FALSE/"sf"/"terra".. Should the function return with geometry?
Default is |
... |
Placeholders. |
a data.frame or SpatVector object.
Insang Song
Preprocessing: process_modis_merge()
, process_modis_swath()
,
process_blackmarble()
## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
## amount of data which is not included in the package.
## Not run:
locs <- data.frame(lon = -78.8277, lat = 35.95013, id = "001")
calculate_modis_daily(
from = mod06l2_warp, # dervied from process_modis() example
locs = locs,
locs_id = "id",
radius = 0,
date = "2024-01-01",
name_extracted = "cloud_fraction_0",
fun_summary = "mean",
max_cells = 3e7
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.