Learn R Programming

MODIS (version 1.2.11)

getSds: List SDS Layers in an HDF File

Description

List the names of all scientific data sets (SDS) contained in a specified MODIS grid HDF file.

Usage

getSds(HdfName, SDSstring = NULL, ...)

Value

A list. If 'SDSstring' is provided, the function reports matching SDS and a formatted 'SDSstring' (e.g., "1 1 1 0 1"). If omitted, the names of all SDS in 'HdfName' are returned.

Arguments

HdfName

character. (Absolute) file name from which to extract SDS names. Non-existing files are being looked up recursively in getOption("MODIS_localArcPath").

SDSstring

An optional character string of 1s and 0s, see Value.

...

Currently not used.

Author

Matteo Mattiuzzi, Florian Detsch

Examples

Run this code
hdf = system.file(
  "external/MOD13A2.A2016145.h18v04.006.2016166145124.hdf"
  , package = "MODIS"
)

getSds(
  hdf
)

getSds(
  hdf
  , SDSstring = 1
)

Run the code above in your browser using DataLab