Skip to contents

Particular for large spatial files, it is often impractical to process the entire layer as single file. Instead such a file could be split in smaller chunks and processed as such.

A common issue then is to reconstruct a spatial file of the original extent. This function takes a list of filenames as input and mosaics them together using a 'vrt' file format.

Usage

spl_mosaicTiffs(files, ofname = NULL, tempdir = NULL, dt = "INT2S", ...)

Arguments

files

A character vector with filenames of spatial files.

ofname

A character where the output should be written (Default: NULL).

tempdir

A character with a temporary folder that must exist (Default: NULL).

dt

A character with the output datatype of the spatial file (Default: "INT2S").

...

Any other parameters passed to writeRaster.

Value

A SpatRaster or just a file.

Details

This function by default uses the 'gdalUtilities' R-package and tools for most of the projections.

See also

Author

Martin Jung

Examples

if (FALSE) { # \dontrun{
 # Get list of files
 ll <- list.files(path_to_folder)

 # Mosaic
 spl_mosaicTiffs(ll, "full_file.tif")
} # }