IMPORTANT: Unlike R functions such as options()
, which changes and saves settings somewhere in a global variable, rsaga.env()
does not actually 'save' any settings, it simply creates a list that can (and has to) be passed to other rsaga.*
functions. See example below.
We strongly recommend to install SAGA GIS on Windows in C:/Program Files/SAGA-GIS
, C:/Program Files (x86)/SAGA-GIS
,C:/SAGA-GIS
, C:/OSGeo4W64/apps/saga-lts
or C:/OSGeo4W64/apps/saga
.
If you use a standalone version of SAGA GIS in a different path, please refer to section 2 bellow.
There are three ways to create a RSAGA environment with rsaga.env
:
No paths to the SAGA command line program and to the SAGA modules are specified by the user through the arguments path
and modules
.
On Windows rsaga.env
tries to find the SAGA command line program in the following folders
C:/Progra~1/SAGA-GIS
, C:/Progra~2/SAGA-GIS
, C:/SAGA-GIS
, C:/OSGeo4W64/apps/saga-lts
and C:/OSGeo4W64/apps/saga
.
If this fails and attempt is being made to find the SAGA command line program with a search on C:/
(The drive letter can be changed with the root
argument).
The subfolder tools
(SAGA Version < 3.0.0 subfolder modules
) is checked for the SAGA module libraries.
On Unix systems rsaga.env
tries to find the SAGA command line program in various default paths.
Additionally, on Unix systems the PATH environment variable is checked for the path to the SAGA command line program
and the SAGA_MLB environment variable is checked for the SAGA module libraries.
If this fails, a search for the SAGA command line program and the module libraries is performed on /usr
.
If no SAGA command line program can be found, please specify the paths as described in section 2.
The user specifies both the path to the SAGA command line program and
to the SAGA module libraries. Both paths are checked if they are valid. Use this if SAGA GIS is located in a non-standard path
or if you use more than one SAGA GIS version.
The user specifies only the path to the SAGA command line program. A search for the SAGA modules is performed as described in section 1.