Skip to contents

Combines multiple raster files into a single virtual raster layer (VRT). It accepts one or more folder names containing raster files and creates a virtual raster file. If no output file name is provided, a temporary file is used.

Usage

compose_raster(dir, out_file = NULL)

Arguments

dir

A string or vector of strings representing folder names containing raster files.

out_file

A string specifying the output file name (without extension). If `NULL`, a temporary file is used.

Value

A `SpatRaster` object from the `terra` package.

See also

Other transform raster functions: aggregate_rasters()

Examples

input_dir <- system.file("extdata", "mdt", package = "sigugr")

r <- compose_raster(input_dir)