stars (version 0.0)

get_get_metadata: get metadata of a raster layer

Description

get metadata of a raster layer

Usage

gdal_metadata(file, domain_item = character(0), options = character(0),
  parse = TRUE)

gdal_subdatasets(file, options = character(0), name = TRUE)

Arguments

file

file name

domain_item

character vector of length 0, 1 (with domain), or 2 (with domain and item); use "" for the default domain, use NA_character_ to query the domain names.

options

character; character vector with data open options

parse

logical; should metadata be parsed into a named list (TRUE) or returned as character data?

name

logical; retrieve name of subdataset? If FALSE, retrieve description

Value

named list with metadata items

gdal_subdatasets returns a zero-length list if file does not have subdatasets, and else a named list with subdatasets.

Examples

Run this code
# NOT RUN {
#f = system.file("tif/L7_ETMs.tif", package="stars")
f = system.file("nc/avhrr-only-v2.19810901.nc", package = "stars")
gdal_metadata(f)
gdal_metadata(f, NA_character_)
# try(gdal_metadata(f, "wrongDomain"))
# gdal_metadata(f, c("", "AREA_OR_POINT"))
# }

Run the code above in your browser using DataLab