jpegR() is a function that will create a small jpeg of a location(s) from
available satellite imagery stored in a local archive. It has been optimized to work on USGS Landsat imagery that has been illumination corrected and stored in a date/satellite data folder structure.

jpegR(wdir, imdir, layer, attrb, start = NA, stop = NA, combo,
  buffer = 2000)

Arguments

  • wdir Path to working directory. This directory will include a shape file which contains the location(s) of interest.

  • imdir Path to local archive of satellite imagery at the path/row level.

  • layer Name of the shape file excluding the extension. Most common usage is for polygon features of sites of interest but can also be point features.

  • attrb Name of the attribute table column heading which contains the unique identifier for the features. Commonly these is site names.

  • start Date to start imagery search. Defaults to none and therefore begins with first locally available satellite image for the path/row.

  • stop Date to end imagery search. Defaults to none and therefore ends with last locally available satellite image for the path/row.

  • combo Three numbers representing the satellite bands to display in RGB colour channels for the output jpegs. For example c(3, 2, 1) would be red green and blue.

  • buffer How far to buffer the shape file feature to create the extent for cropping the satellite image. For example for a projected GDA94 MGA50 satellite image, a buffer of 2000 would equate to a 2km buffer around the shape file feature. Controls the ‘zoom’ level of the output jpegs.

What it does

When called jpegR() will:

  1. Create a folder named site_vectors in the working directory.
  2. Split the original shape file into a separate shape file for each unique identifier in the attrb argument.
  3. Create a .txt file containing the name of the original shape file.
  4. Will perform a check of the image directory to ensure all images have correct dates (checks against incorrectly dated leap years).
  5. Creates a folder named after each new unique shape file and then using that location as a centroid, creates a jpeg from all the satellite images conforming to the supplied arguments.

Uses

The main purpose for the output jpegs is for checking image dates at site locations for cloud artifacts prior to extracting pixel values for further analysis. This is an alternative method for image quality assessment which has historically entailed cloud masking entire scenes prior to analysis.

Although originally designed for cloud quality assessment other uses can include:

  • Rapid image assessment for impacts (fires, floods, deforestation, etc).

  • Narrowing down dates of impacts.

  • Creation of inputs for animations.

Example Output

The below examples show jpegs created showing a polygon feature (in this case a wetland) outlined in magenta. A cloud affected site displayed in false colour 542

A non-cloud affected site displayed in false colour 542

A non-cloud affected site displayed in false colour 542