vapour_sds: Subdatasets of raster sources

View source: R/raster-info.R

vapour_sdsR Documentation

Subdatasets of raster sources

Description

A data frame of the subdatasets of one or more raster sources, one row for each subdataset. This is the vectorised form of vapour_sds_names(), and it also gives GDAL's description of each subdataset.

Usage

vapour_sds(x)

Arguments

x

one or more data source strings, filename, database connection string, or other URL

Details

A source with no subdatasets gives one row, in which subdataset is the source itself and description is NA. So every source has at least one row, and every value of subdataset is a data source that can be opened.

Value

data frame with columns

dsn

the source, as given in x

sds

the number of the subdataset within its source, counted from 1 (as used by the sds argument of other functions)

subdataset

the data source string of the subdataset

description

GDAL's description of the subdataset, usually its dimensions, name and type

See Also

vapour_sds_names() vapour_raster_info()

Examples

tif <- system.file("extdata", "sst.tif", package = "vapour")
vapour_sds(tif)

f <- system.file("extdata/gdal", "sds.nc", package = "vapour")
## protect from error with netcdf problems
result <- try(vapour_sds(c(f, tif)), silent = TRUE)
if (!inherits(result, "try-error")) {
  print(result)
}

vapour documentation built on Nov. 26, 2026, 5:07 p.m.