ls8LoadMetadata: Load or update the Landsat-8 metadata file

Description Usage Arguments Details Value Examples

View source: R/ls8LoadMetadata.R

Description

ls8LoadMetadata loads a data.frame called ".LS8MD" with the names of the Landsat-8 images and their metadata. The metadata provides auxiliary information, such as image quality, acquisition date, cloud cover, etc. You can find a description of the metadata on the USGS's website.

Usage

1
2
3
4
5
6
7
ls8LoadMetadata(
  AppRoot,
  update = FALSE,
  verbose = TRUE,
  omit.question = FALSE,
  ...
)

Arguments

AppRoot

the directory where the metadata file should be located.

update

logical argument. If TRUE, updates the metadata file.

verbose

logical argument. If TRUE, the function prints the running steps and warnings.

omit.question

logical argument. If TRUE, the question about loading the metadata is omitted.

...

arguments for nested functions.

Details

All captures done by Landsat-8 are catalogued and documented in a unique csv file. The size of the file could be larger than 210MB. The function downloads and imports the metadata into ‘R’, which may take several minutes (roughly 7 minutes in a Intel Core i7-4790, 16Gb of RAM and Hard Drive Device). The function creates an RData file with the csv metadata. Thus, every time ls8LoadMetadata is called, this function loads the existing RData from the AppRoot directory, which aims to reduce the loading time of the metadata in the future.

Value

this function does not return anything, but loads the “.LS8MD” data.frame on the ‘RGISTools’ package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# creates a MetaData folder and downloads the csv in the "Path_for_downloading_folder" directory
ls8LoadMetadata(AppRoot = file.path(tempdir(),"Path_for_downloading_folder"))

# update the metadata file
ls8LoadMetadata(AppRoot = file.path(tempdir(),"Path_for_downloading_folder"), update = TRUE)

# get metadata data frame 
LS8MD <- getRGISToolsOpt("LS8METADATA")
head(LS8MD)

## End(Not run)

RGISTools documentation built on July 2, 2020, 3:58 a.m.