Learn R Programming

terra (version 0.9-11)

describe: describe

Description

Describe the properties of spatial data in a file, or get the metadata. The output from desc is generated with "GDALinfo".

Usage

# S4 method for character
desc(x, sds=FALSE, options="", print=FALSE, open_opt="", ...)

# S4 method for character meta(x, sds=FALSE, parse=FALSE, ...)

Arguments

x

character. The name of a file with spatial data. Or a fully specified subdataset within a file such as "NETCDF:\"AVHRR.nc\":NDVI"

sds

logical. If TRUE the description or metadata of the subdatasets is returned (if available)

options

character. A vector of valid options including "json", "mm", "stats", "hist", "nogcp", "nomd", "norat", "noct", "nofl", "checksum", "proj4", "listmdd", "mdd <value>" where <value> specifies a domain or 'all', "wkt_format <value>" where value is one of 'WKT1', 'WKT2', 'WKT2_2015', or 'WKT2_2018', "sd <subdataset>" where <subdataset> is the name or identifier of a sub-dataset. See https://gdal.org/programs/gdalinfo.html. Ignored if sds=TRUE

print

logical. If TRUE, print the results

open_opt

character. Driver specific open options

parse

logical. If TRUE, metadata for subdatasets is parsed into components

...

additional arguments. None implemented

Value

character (invisibly, if print=FALSE)

Examples

Run this code
# NOT RUN {
f <- system.file("ex/test.tif", package="terra")
desc(f)
meta(f)
#g <- desc(f, options=c("json", "nomd", "proj4"))
#cat(g, "\n")
# }

Run the code above in your browser using DataLab