Linking R with the Open-Source 'SAGA-GIS' Software

Provides an R scripting interface to the open-source 'SAGA-GIS' (System for Automated Geoscientific Analyses Geographical Information System) software. 'Rsagacmd' dynamically generates R functions for every 'SAGA-GIS' geoprocessing tool based on the user's currently installed 'SAGA-GIS' version. These functions are contained within an S3 object and are accessed as a named list of libraries and tools. This structure facilitates an easier scripting experience by organizing the large number of 'SAGA-GIS' geoprocessing tools (>700) by their respective library. Interactive scripting can fully take advantage of code autocompletion tools (e.g. in 'Rstudio'), allowing for each tools syntax to be quickly recognized. Furthermore, the most common types of spatial data (via the 'raster', 'terra', 'sp', and 'sf' packages) along with non-spatial data are automatically passed from R to the 'SAGA-GIS' command line tool for geoprocessing operations, and the results are loaded as the appropriate R object. Outputs from individual 'SAGA-GIS' tools can also be chained using pipes from the 'magrittr' and 'dplyr' packages to combine complex geoprocessing operations together in a single statement. 'SAGA-GIS' is available under a GPLv2 / LGPLv2 licence from <> including Windows x86/x84 binaries. SAGA-GIS is also included in Debian/Ubuntu default software repositories and is available for macOS using homebrew (<>) from the osgeo/osgeo4mac (<>) formula tap. Rsagacmd has currently been tested on 'SAGA-GIS' versions from 2.3.1 to 7.9.0 on Windows, Linux and macOS.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.1.1 by Steven Pawley, 3 months ago

Browse source code at

Authors: Steven Pawley [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports XML, sf, raster, terra, stars, tools, utils, rgdal, foreign, stringr, rlang, tibble, processx

Suggests dplyr, testthat, covr

System requirements: SAGA-GIS (>= 2.3.1)

See at CRAN