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)
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.
When called jpegR()
will:
site_vectors
in the working directory.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.
The below examples show jpegs created showing a polygon feature (in this case a wetland) outlined in magenta.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.