GDAL version, supported file formats, and cache size
gdal.Rd
Set the GDAL
warning level or get a data.frame
with the available GDAL drivers (file formats), or, if warn=NA
and drivers=FALSE
, you get the version numbers of one or all of the GDAL, PROJ and GEOS libraries.
GDAL
is the software library that terra builds on to read and write spatial data and for some raster data processing. PROJ
is used for transformation of coordinates ("projection") and GEOS
is used for geometric operations with vector data.
Usage
gdal(warn=NA, drivers=FALSE, lib="gdal")
gdalCache(size=NA)
setGDALconfig(option, value="")
getGDALconfig(option)
Arguments
- warn
If
NA
anddrivers=FALSE
, the version of the library specified bylib
is returned. Otherwise, the value should be an integer between 1 and 4 representing the level of GDAL warnings and errors that are passed to R. 1 = warnings and errors; 2 = errors only (recoverable errors as a warning); 3 = irrecoverable errors only; 4 = ignore all errors and warnings. The default setting is 3- drivers
logical. If
TRUE
a data.frame with the raster and vector data formats that are available.- lib
character. "gdal", "proj", or "geos", or any other value to get the versions numbers of all three
- size
numeric. The new cache size in MB
- option
character. GDAL configuration option name, or a "name=value" string (in which case the value argument is ignored
- value
character. value for GDAL configuration option. Use "" to reset it to its default value
See also
describe
for file-level metadata "GDALinfo"
Examples
gdal()
#> [1] "3.9.3"
gdal(2)
head(gdal(drivers=TRUE))
#> name raster vector can vsi long.name
#> 1 AAIGrid TRUE FALSE read/write TRUE Arc/Info ASCII Grid
#> 2 ACE2 TRUE FALSE read TRUE ACE2
#> 3 ADRG TRUE FALSE read/write TRUE ARC Digitized Raster Graphics
#> 4 AIG TRUE FALSE read TRUE Arc/Info Binary Grid
#> 5 AVCBin FALSE TRUE read TRUE Arc/Info Binary Coverage
#> 6 AVCE00 FALSE TRUE read TRUE Arc/Info E00 (ASCII) Coverage