check_gdal: Check GDAL installation

Description Usage Arguments Value Note Author(s) Examples

View source: R/fct_check_gdal.R

Description

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

Usage

1
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).

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2019) luigi@ranghetti.info

Examples

1
2
3
4
5
# Use function
check_gdal()

# Check GDAL was imported
load_binpaths()$gdalinfo

pobsteta/shinyCNES documentation built on April 28, 2021, 9:43 a.m.