This function can be used to prepare module inputs from raw data. It
runs several other functions, conditionally:
extractFromArchive
.
prepInputs(targetFile, archive = NULL, modulePath, moduleName,
fun = "raster", pkg = "raster", studyArea = NULL,
rasterToMatch = NULL, rasterInterpMethod = "bilinear",
rasterDatatype = "INT2U", writeCropped = TRUE, addTagsByObject = NULL,
quick = FALSE, cacheTags = "stable")
Character string giving the path of the raw data.
Optional character string giving the path of an archive
containing targetFile
.
Character string giving the path to the module directory.
Character string giving the name of the module.
Character string indicating the function to use to load
targetFile
.
Character string indicating the package in which to find fun
.
spatial* or sf object used for cropping and masking.
Template Raster* object used for reprojecting and cropping.
Method used to compute values for the new
RasterLayer. See projectRaster
. Defaults to bilinear.
Output data type. Passed to writeRaster
.
Write the output on disk ?
Pass any object in there for which there is a .tagsByClass function
Logical. If sideEffect = TRUE
, setting this to TRUE
,
will hash the file's metadata (i.e., filename and file size) instead of
hashing the contents of the file(s). If set to FALSE
(default),
the contents of the file(s) are hashed.
NOTE: this argument is experimental and may change in future releases.
Character vector with Tags. These Tags will be added to the repository along with the artifact.