aggregate_rasters {sigugr} | R Documentation |
Aggregate Rasters in a Folder
Description
Aggregates all raster files ('.tif' or '.jp2') in a specified folder by the given factor and saves the resulting files in an output folder.
Usage
aggregate_rasters(dir, out_dir, factor = 2)
Arguments
dir |
A string specifying the input folder containing raster files. |
out_dir |
A string specifying the output folder where the aggregated rasters will be saved. |
factor |
An integer specifying the aggregation factor (default is 2). |
Details
If the output folder does not exist, it creates it.
Value
A character vector with the paths to the processed raster files.
See Also
Other transform raster functions:
compose_raster()
Examples
temp_dir <- tempdir()
input_dir <- system.file("extdata", "mdt", package = "sigugr")
result_files <- aggregate_rasters(input_dir, temp_dir, factor = 4)
[Package sigugr version 1.0.0 Index]