Skip to contents

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).

Value

A character vector with the paths to the processed raster files.

Details

If the output folder does not exist, it creates it.

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)