Description Usage Arguments Value Note Examples
View source: R/calculate_TerraBella_indices.r
When given a TerraBella .tif file, calculate chosen spectral indices
1 2 | calculate_TerraBella_indices(inp_tif_fnames, index_names, outp_dir,
overwrite = T)
|
inp_tif_fnames |
Filenames of an TerraBella tif files |
index_names |
Character vector of spectral indices (see CanHeMonR::spectral_indices) you want to have calculated. Remember TerraBella is 4 broad bands only |
outp_dir |
Directory to write output to |
overwrite |
Should existing output be overwritten? Default is T. |
a raster brick with the chosen indices and a file for each index, written away to the output directory
TO DO: adapt to work in parallel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
#calculate NDVI for all the TerraBella scenes of Granadilla
raster::rasterOptions(progress='text')
raster::rasterOptions(tmpdir = 'E:/beckpie/temp/Raster_temp/')
inpdir <- 'X:/Imagery/Granadilla/Skybox/dark_object_corrected'
fnames <- list.files(inpdir)
fnames <- fnames[grep('.tif',fnames)]
fnames <- fnames[substr(fnames,nchar(fnames)-3,nchar(fnames))==".tif"]
fnames <- file.path(inpdir, fnames)
calculate_TerraBella_indices(inp_tif_fnames = fnames, index_names='NDVI',
outp_dir ="X:/Imagery/Granadilla/Skybox/dark_object_corrected/spectral_indices")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.