getSceneinfo: List Landsat Scene Information from Scene IDs

Description Usage Arguments Details Value Author(s) Examples

Description

Generate a table (data.frame) of basic scene information for Landsat5/7/8 data given input scene IDs or filenames. This function can be used to extract this information for single scenes or for an entire collection of scenes (supplied as a character vector). In both cases, a single data frame is returned displaying the sceneID, sensor, path, row, and acquisition date. This data.frame can optionally be written to .csv file for future reference.

Usage

1
getSceneinfo(sourcefile, filename = "")

Arguments

sourcefile

character vector containing names of scenes to be analyzed. The scene names must adhere to the Landsat convention. Original filenames (with the .tar.gz extension) are allowed

filename

optional output filename. If supplied, a .csv is written containing extracted scene information

Details

It is important to supply the input character vector without changing the names of the scenes, since the getSceneinfo function looks at certain positions in the input character for the necessary information. The input vector may be comprised of original .tar.gz filenames as downloaded from (e.g.) GloVis, which allows for a quick check of scene information in batch mode directly after downloading the data.

Value

a data.frame with columns representing sensor, path, row, and acquisition date for given scenes.

Author(s)

Ben DeVries

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Extract scene information from a known sceneID
sceneID <- "LC80330322013077LGN00"
info <- getSceneinfo(sceneID)
print(info)

# Extract scene information from a scene filename
sceneID <- "LC80330322013077LGN00.tar.gz"
info <- getSceneinfo(sceneID)
print(info)

# Extract scene information from an entire folder containing subfolders with raw data
folders <- c("LE71700551999255AGS00","LE71700551999271EDC00",
"LE71700552000114SGS00","LE71700552000194EDC00","LE71700552000258SGS00",
"LE71700552001036SGS00","LE71700552001180SGS00","LE71700552001228SGS00",
"LE71700552001276SGS00", "LT51700552001060RSA00")
info <- getSceneinfo(folders)
print(info)

# Plot the number of scenes acquired per year
years <- as.numeric(substr(info$date, 1, 4))
plot(table(years), ylab="# of scenes")

bendv/bfastmonitor.rasterEngine documentation built on May 12, 2019, 10:58 a.m.