Class "GDALDriver": GDAL Driver Object

Share:

Description

GDALDriver objects encapsulate GDAL file format drivers. GDALDriver inherits from GDALMajorObject-class.

Usage

1
2
3
4
5
6
7
8
getGDALDriverNames()
gdalDrivers()
getDriverName(driver)
getDriverLongName(driver)
getGDALVersionInfo(str = "--version")
getGDALCheckVersion()
getCPLConfigOption(ConfigOption)
setCPLConfigOption(ConfigOption, value)

Arguments

driver

An object inheriting from class 'GDALDriver'

str

A string, may be one of "--version", "VERSION_NUM", "RELEASE_DATE", "RELEASE_NAME"

ConfigOption

CPL configure option documented in http://trac.osgeo.org/gdal/wiki/ConfigOptions and elsewhere in GDAL source code

value

a string value to set a CPL option; NULL is used to unset the CPL option

Details

getGDALDriverNames, gdalDrivers:

returns all driver names currently installed in GDAL, with their declared create and copy status (some drivers can create datasets, others can only copy from a prototype with a different driver.

getDriverName:

returns the GDAL driver name associated with the driver object.

getDriverLongName:

returns a longer driver name.

getGDALVersionInfo:

returns the version of the GDAL runtime shared object.

getGDALCheckVersion:

checks the version of the GDAL headers used when building the package (GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR) - if the two versions differ, problems may arise (the C++ API/ABI may have changed), and rgdal should be re-installed

Objects from the Class

Objects can be created by calls of the form new("GDALDriver", name, handle), where name: a string giving the name of a GDAL driver, handle: used internally; not for public consumption (default = NULL).

Slots

handle:

Object of class "externalptr", from class "GDALMajorObject", used internally; not for public consumption

Extends

Class "GDALMajorObject", directly.

Methods

initialize

signature(.Object = "GDALDriver"): drivername: a string giving the name of a GDAL driver, handle: used internally; not for public consumption (default = NULL)

Note

Loading the rgdal package changes the GDAL\_DATA environmental variable to the GDAL support files bundled with the package.

Author(s)

Timothy H. Keitt, modified by Roger Bivand

See Also

GDALMajorObject-class

Examples

1
2
3
4
5
6
gdalDrivers()
logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
x <- new("GDALReadOnlyDataset", logo)
getDriver(x)
getDriverLongName(getDriver(x))
GDAL.close(x)