Learn R Programming

RSAGA (version 0.94-5)

rsaga.default.path: Determine SAGA GIS default paths

Description

Internal functions that determine OS-specific default paths in which SAGA GIS binaries and modules might be located.

Usage

rsaga.default.path(sysname = Sys.info()["sysname"])
rsaga.default.modules.path(sysname = Sys.info()["sysname"], saga.path = rsaga.default.path(sysname))

Arguments

sysname
character: name of the operating system, determined by default by Sys.info: e.g., "Windows", "Linux", "Darwin" (for Mac OSX), or "FreeBSD"
saga.path
character: path with SAGA GIS binaries, as determined (e.g.) by rsaga.default.path

Details

These functions are used internally by rsaga.env. On Windows systems, the guess made by rsaga.default.path is "C:/Progra~1/SAGA-GIS", and for the modules, it is the "modules" subfolder of the path with the binaries.

On non-Windows systems, rsaga.default.path submits a which saga_cmd call to the operating system to find the binaries, usually in /usr/local/bin or in /usr/bin. To find the modules, rsaga.default.modules.path first checks if a SAGA_MLB environment variable exists. If not, it will replace the /bin part (if present) with /lib/saga or otherwise it just guesses that it's /usr/local/lib/saga.

See Also

rsaga.env