ls7LoadMetadata: Load or update the Landsat-7 metadata file

Description Usage Arguments Details Value Examples

View source: R/ls7LoadMetadata.R

Description

ls7LoadMetadata loads a data.frame called ".LS7MD" with the names of the Landsat-7 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
ls7LoadMetadata(
  AppRoot,
  update = FALSE,
  verbose = TRUE,
  omit.question = TRUE,
  ...
)

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-7 are catalogued and documented in a unique csv file. The size of the file could be larger than 360MB. The function downloads and imports the metadata into ‘R’, which may take several minutes (roughly 15 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 ls7LoadMetadata 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 “.LS7MD” data.frame on the environment of the ‘RGISTools’ package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# creates a MetaData folder and downloads the csv in the "Path_for_downloading_folder" directory
ls7LoadMetadata(AppRoot = file.path(tempdir(),"Path_for_downloading_folder"))

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

# get metadata data frame 
LS7MD <- getRGISToolsOpt("LS7METADATA")
head(LS7MD)

## End(Not run)

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