sen2r (version 1.2.1)

check_gdal: Check GDAL installation

Description

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

Usage

check_gdal(abort = TRUE, gdal_path = NULL, force = FALSE,
  full_scan = 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.

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). Notice that, defining gdal_path, GDAL is searched again even if "force" = FALSE in case the existing installation is not in gdal_path.

full_scan

(optional) Logical: in Linux and MacOS, if gdal_path was not manually defined, GDAL is searched within the system path in case this argument is left to default value FALSE; instead, if TRUE, a full search is performed. In Windows, if the default OSGeo directory C:\OSGeo4W64 exists, GDAL is searched there, instead in the main directory C:\; setting full_scan to TRUE, is is always searched in the whole C:\. This argument takes no effect if gdal_path was defined, since, in that case, a full search is always performed in gdal_path.

Value

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

Examples

Run this code
# NOT RUN {
# Use function
check_gdal()

# Check GDAL was imported
load_binpaths()$gdalinfo
# }

Run the code above in your browser using DataLab