Rsagacmd aims to facilitate
a seamless interface to the open-source SAGA-GIS by providing access to all
SAGA-GIS geoprocessing tools in a 'R-like' manner. In addition to
generating R functions that correspond to each SAGA-GIS tool, Rsagacmd
automatically handles the passing of geospatial and tabular data contained
from the R environment to SAGA-GIS.
Rsagacmd uses the SAGA-GIS command line interface to perform geoprocessing
operations. Therefore, spatial data can be passed to any Rsagacmd function as
a path to the input data, assuming that the data is stored in the appropriate
file formats (e.g. GDAL-supported single-band rasters, OGR supported vector
data, and comma- or tab-delimited text files for tabular data). In addition,
Rsagacmd also supports the following R object classes to pass data to
SAGA-GIS, and to load the results back into the R environment:
Raster data handling is provided by the R terra and stars
packages. Raster-based outputs from SAGA-GIS tools are loaded as SpatRaster
or stars objects. For more details, see the 'Handling of raster data'.
Vector features that result from SAGA-GIS geoprocessing operations are
output in ESRI Shapefile format and are loaded into the R environment as
simple features objects
Tabular data from SAGA-GIS tools are loaded as data frames
The results from tools that return multiple outputs are loaded into the R
environment as a named list of the appropriate R object classes.