The function check that GDAL is installed and updated to the minimum required version (2.1.2).

check_gdal(abort = TRUE, gdal_path = NULL, force = FALSE,
  ignore.full_scan = TRUE)

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.

gdal_path

(optional) Character: the path in which GDAL must be searched in. If NULL (default), search is performed in the whole file system.

force

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

ignore.full_scan

(optional) Logical: argument passed to gdal_setInstallation (default is TRUE; set to FALSE in case of problems with the retrieved GDAL installation, e.g. when an undesired GDAL version is retrieved and the user wants to associate another one).

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

Examples

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

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