convertToSAGA: Convert files to SAGA raster format

View source: R/SOptim_ImportConvertData.R

convertToSAGAR Documentation

Convert files to SAGA raster format

Description

An auxiliar function used to convert a RasterLayer, RasterStack or any raster file (given by a file path) into SAGA .sdat/.sgrd raster format.

Usage

convertToSAGA(rst, outRasterPath, verbose = TRUE, ...)

Arguments

rst

An input RasterLayer, RasterStack object or alternatively a character indicating a raster file path used for conversion.

outRasterPath

The output SAGA raster .sdat file.

verbose

Print messages? (default: TRUE)

...

Additional parameters passed to writeRaster.

Details

For RasterStack objects each individual layer (or band) will be convert to a single .sdat file (this format has no support for multiband raster files). Each output file will be given a suffix _b1, _b2, ..., _bn according to the band position.


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.