extractR() is a function that will extract mean pixel values from dates of Landsat satellite imagery, from locations provided by shape file. It has been optimized to work on USGS Landsat imagery that has been illumination corrected and stored in a date/satellite data folder structure.

extractR(wdir, imdir, option, attrb)

Arguments

NOTE: This function is to be run after jpegR and the common arguments above should be the same as those used when running jpegR.

What it does

When called extract() will:

  1. Copy each unique shape file to the appropriate jpeg folder.
  2. Obtain suitable dates of satellite imagery to access from the names of the jpegs remaining in the jpeg folders.
  3. Will extract the mean vegetation index or band values for each unique shape file from each suitable image date. It writes these values to .csv file and stores in the appropriate jpeg folder.
  4. Collates all .csv files into one appropriately named .csv file. This file contains all the extracted values for each of the unique shape files.

Uses

The main purpose of this function is to extract mean values from satellite imagery that has been quality assessed after using the function jpegR. This function is optimised to extract values for dense time series analysis. This function will work on any multiband imagery provided that:

Example Output

NOTE re-running this function will overwrite any previous output if the date ranges are the same. Each output .csv will have the name of the beginning and end dates of the imagery processed.

For a single site the output .csv will be formatted:

date | site1 ------------|--------- 10/03/1999 | 73.11526 26/03/1999 | 37.10274 etc | etc

Note that this data set will never have any NA values as only suitable imagery is processed.

For the collated sites output the .csv will be formatted:

..| date | site1 | site2 | etc --|-------------|-----------|-----------|---- 1 | 10/03/1999 | 73.11526 | NA | etc 2 | 26/03/1999 | 37.10274 | 35.19674 | etc 3 | 14/06/1999 | NA | 44.44317 | etc

Note this data set will contain NA values for location/date combinations that were deemed unsuitable after using the jpegR function. This is most commonly due to cloud. Also note that the .csv will contain numbered rows. Other analysis functions take this into consideration.



RSPaW/RSSApkg documentation built on May 21, 2019, 1:41 a.m.