gdalUtils (version 0.2.0)

gdal_setInstallation: gdal_setInstallation

Description

Sets local GDAL installation options

Usage

gdal_setInstallation(rescan = FALSE)

Arguments

rescan
Logical. Force a rescan if neccessary (e.g. if you updated your GDAL install).

Value

  • Sets an option "gdalUtils_gdalPath" with GDAL installation information.

Details

This function searches the local system for valid installations of GDAL, and returns a list, one item per valid GDAL install, containing the path to the installation, the version, the release date, available drivers, and available python utilities. The list will be sorted by release date, so in general the first entry is the one that is used by the various GDAL utilities. Note that this will automatically run every time a GDAL wrapper function is called, so the user does not have to explicitly run it.

References

http://www.gdal.org/gdal_translate.html

Examples

Run this code
# Assumes you have GDAL installed on your local machine.
getOption("gdalUtils_gdalPath")
gdal_setInstallation()
getOption("gdalUtils_gdalPath")
# If there is more than one installation of GDAL, this is the
# most recent installation:
getOption("gdalUtils_gdalPath")[[1]]
# The version number:
getOption("gdalUtils_gdalPath")[[1]]$version

Run the code above in your browser using DataLab