extractR: Extracts mean values from Landsat imagery based on locations...

Description Usage Arguments Value Author(s) Examples

View source: R/extractR.R

Description

extractR will extract mean pixel values from dates, determined from quality assessed jpegs, of Landsat raster imagery, from locations as provided by shape files. Common usage is for extracting vegetation indices from field work or calibration sites. When run it will:

  1. Copy the appropriate shape files to the appropriate quality assessed jpeg folders based on attribute id.

  2. Looks in each jpeg folder to determine appropriate image dates i.e. stores the dates of the remaining jpegs after quality assessment.

  3. Based on user input, extracts mean band or vegetation index value per site from the shape file.

  4. Writes mean values to a .csv file and stores each in appropriate jpeg folder.

  5. On completion it will join all extracted value data sets into one .csv file.

Usage

1
extractR(wdir, imdir, option, attrb)

Arguments

wdir

Character string filepath to the working directory where the original shape files are located. This working directory must contain a folder named "site_vectors" which contains the individual shape files for extraction.

imdir

Character string filepath to the path/row level for imagery.

option

A character string indicating one of the following "i35", "ndvi", "b1", "b2", "b3", "b4", "b5", "b6".

attrb

A character string of the name of field in the attribute column of the shape file that contains the unique identifier for the location. This must be the same as was used to create the jpegs and is usually the site ID.

Value

Creates individual .csv files for extracted values per shape file and another that collates them all.

Author(s)

Bart Huntley, [email protected]

For more details see https://rspaw.github.io/RSSApkg/index.html the RSSApkg website

Examples

1
2
3
4
## Not run: 
extractR(wdir = "z:/working", imdir = "W:/usgs/115078", option = "i35", attrb = "ID")

## End(Not run)

RSPaW/RSSApkg documentation built on May 31, 2018, 5:23 p.m.