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,
  full_scan = FALSE)



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.


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


(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.


(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.


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


License: GPL 3.0


# \donttest{ # Use function check_gdal()
#> GDAL version in use: 2.2.3
# Check GDAL was imported load_binpaths()$gdalinfo
#> [1] "/usr/bin/gdalinfo"
# }