check_gdal: Check GDAL installation

Description Usage Arguments Value Note Author(s) Examples

Description

The function check that GDAL is installed and updated to the minimum required version (2.1.3, since previous versions do not manage SAFE format).

Usage

1
check_gdal(abort = TRUE, force = FALSE)

Arguments

abort

Logical parameter: if TRUE (default), the function aborts in case no GDAL installation is found; if FALSE, a warning is shown and FALSE is returned.

force

(optional) Logical: if TRUE, install even if it is already installed (default is FALSE).

Value

Logical (invisible): TRUE in case the installation is ok, FALSE if GDAL is missing and abort=FALSE (otherwise, the function stops).

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2017) ranghetti.l@irea.cnr.it

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 

# Remove previous GDAL information
options("gdalUtils_gdalPath" = NULL)
getOption("gdalUtils_gdalPath")

# Use function
check_gdal()
getOption("gdalUtils_gdalPath")

## End(Not run)

pobsteta/theia2r documentation built on May 25, 2019, 2:21 p.m.