rsaga.get.version: Determine SAGA GIS version

View source: R/RSAGA-core.R

rsaga.get.versionR Documentation

Determine SAGA GIS version

Description

Determine SAGA GIS version.

Usage

rsaga.get.version(env = rsaga.env(version = NA), ...)

Arguments

env

list, setting up a SAGA geoprocessing environment as created by rsaga.env(). Note that version=NA ensures that rsaga.env() won't call rsaga.get.version itself.

...

additional arguments to rsaga.geoprocessor()

Details

The function first attempts to determine the SAGA version directly through a system call saga_cmd --version, which is supported by SAGA GIS 2.0.8+. If this fails, saga_cmd -h is called, and it is attempted to extract the version number of the SAGA API from the output generated, which works for 2.0.4 - 2.0.7.

Value

A character string defining the SAGA GIS (API) version. E.g., "2.0.8".

See Also

rsaga.env()

Examples

## Not run: 
myenv <- rsaga.env()
myenv$version
# rsaga.env actually calls rsaga.get.version:
rsaga.get.version()

# I keep several versions of SAGA GIS in SAGA-GIS_2.0.x folders:
myenv05 = rsaga.env(path = "C:/Progra~1/SAGA-GIS_2.0.5", version = NA)
# Check if it's really version 2.0.5 as suggested by the folder name:
rsaga.get.version(env = myenv05)

## End(Not run)

RSAGA documentation built on Dec. 10, 2022, 1:12 a.m.