jpegR
makes small jpeg images centered on and showing site locations
from a shape file. This function can be used as part of the cloud quality
check process prior to extracting satellite bands or indices. Although
designed to help the QA process the jpegs can be useful for quickly checking
many image dates for change (e.g. fires, vegetation removal, etc) or for
creating stills for animating. When run the function:
Obtains a list of imagery folders to access. In doing so it also
checks for folder name errors (u_leapR
) and only returns
sun-corrected image folders.
Splits a supplied shape file by unique attribute field entries,
stores results in a folder and writes a text file containing the original
shape file name (u_shpsplitR
).
Creates a small jpeg of the individual sites for each image date as per step 1. jpegs are based on band combination from user input and buffered by a desired distance.
All outputs are placed in appropriately named folders per site in the working directory
jpegR(wdir, imdir, layer, attrb, start = NA, stop = NA, combo, buffer = 2000)
wdir | Character string filepath to the working directory where the original shape file is located. |
---|---|
imdir | Character string filepath to the path/row level for imagery. |
layer | Character string of the name of the shape file (no extension). |
attrb | Character string of the name of the field in the attribute table of the shape file that contains the unique entries (e.g.site numbers). |
start | Character string representing start date of imagery search. Must be in the form "dmY" or "dmy" and can include separators. Defaults to NA so image search starts from first available image in the RSSA archive. |
stop | Character string representing end date of imagery search. Must be in the form "dmY" or "dmy" and can include separators. Defaults to NA so image search ends with latest available image in the RSSA archive. |
combo | Numerics representing bands to place in RGB channels of the jpeg. Must be of the form c(Nr, Ng, Nb) where Nr is the band number for the red channel etc. |
buffer | Numeric representing how much to buffer out the site to control zoom level for jpegs. If imagery crs is projected, number represents metres. If imagery is geodetic then the number represents degrees. |
Creates named folders, based on site location and dates of images processed, containing small jpeg images for visual assessment.
# NOT RUN { jpegR(wdir = "z:/working", imdir = "W:/usgs/115078", layer = "site_locations", attrb = "ID", start = "1/1/98", stop = "28-12-2009", combo = c(5,4,2), buffer = 2000) # }