getCreationOptions | R Documentation |
getCreationOptions()
returns the list of creation options supported by a
GDAL format driver.
This function is a wrapper of GDALGetDriverCreationOptionList()
in the
GDAL API, parsing its XML output into a named list.
getCreationOptions(format, filter = NULL)
format |
Format short name (e.g., |
filter |
Optional character vector of creation option names. |
The output is a nested list with names matching the creation option names. The information for each creation option is a named list with the following elements:
$type
: a character string describing the data type, e.g., "int"
,
"float"
, "string"
. The type "string-select"
denotes a list of allowed
string values which are returned as a character vector in the $values
element (see below).
$description
: a character string describing the option, or NA
if no
description is provided by the GDAL driver.
$default
: the default value of the option as either a character string
or numeric value, or NA
if no description is provided by the GDAL driver.
$values
: a character vector of allowed string values for the creation
option if $type
is "string-select"
, otherwise NULL
if the option is
not a "string-select"
type.
$min
: (GDAL >= 3.11) the minimum value of the valid range for the
option, or NA
if not provided by the GDAL driver or the option is not a
numeric type.
$max
: (GDAL >= 3.11) the maximum value of the valid range for the
option, or NA
if not provided by the GDAL driver or the option is not a
numeric type.
A named list with names matching the creation option names, and
each element a named list with elements $type
, $description
, $default
and $values
(see Details).
create()
, createCopy()
, translate()
, validateCreationOptions()
,
warp()
opt <- getCreationOptions("GTiff", "COMPRESS")
names(opt)
(opt$COMPRESS$type == "string-select") # TRUE
opt$COMPRESS$values
all_opt <- getCreationOptions("GTiff")
names(all_opt)
# $description and $default will be NA if no value is provided by the driver
# $values will be NULL if the option is not a 'string-select' type
all_opt$PREDICTOR
all_opt$BIGTIFF
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.