Learn R Programming

terra (version 0.6-9)

gdal_info: GDALinfo

Description

gdal_info calls the GDALinfo tool that provides the properties of a file with raster data.

Usage

gdal_info(filename, options="", print=TRUE, open_opt="", ...)
gdal_version()

Arguments

filename

character

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 of a sub-dataset. See https://gdal.org/programs/gdalinfo.html

print

logical. If TRUE, print the results

open_opt

character. Driver specific open options

...

additional arguments. None implemented

Value

character (invisibly, if print=TRUE)

Examples

Run this code
# NOT RUN {
f <- system.file("ex/test.tif", package="terra")
gdal_info(f)

# }
# NOT RUN {
g <- gdal_info(f, c("json", "nomd", "proj4"), print=FALSE)
cat(g, "\n")
# }

Run the code above in your browser using DataLab