All functions |
|
---|---|
get information corresponding to data type defined in ENVI |
|
Prepare for the computation of the functional diversity metrics |
|
This function computes interquartile range (IQR) criterion, which can be used as a criterion for outlier detection |
|
identifies bytes where to read or write for each piece of an image in a given file |
|
identifies bytes where to read and write for each piece of image and all files |
|
get max index for each row and convert into linear index |
|
Compute the weighted coordinates of a spatial unit based on nearest neighbors used during PCoA |
|
write an image which size is > 2**31-1 |
|
write an image resulting from "window processing" at native spatial resolution (assuming square windows & origin at top left corner) |
|
Zips an image file |
|
prepares data to run multithreaded continuum removal |
|
Applies Kmeans clustering to PCA image and writes spectral species map |
|
rebuilds full image from list of subsets |
|
center and reduce data matrix based on known mean and SD |
|
change resolution in a HDR file |
|
Checks if the data to be processed has the format type expected |
|
check if the format of the mask is as expected: integer, coded in Bytes, same dimensions as input image |
|
compute alpha diversity from spectral species computed for a plot expecting a matrix of spectral species (n pixels x p repetitions) |
|
compute the bray curtis dissimilarity matrix corresponding to a list of kernels (rows) defined by their spectral species (columns) SSDList is a list containing spectral species distribution for two sets of kernels ([[1]] and [[2]]) pcelim is the threshold for minimum contributin of a spctral species to be kept |
|
compute beta diversity from spectral species computed for a plot expecting a matrix of spectral species (n pixels x p repetitions) |
|
compute functional diversity metrics for an array, given a specific window size |
|
Map functional diversity metrics based on spectral species |
|
compute the nearest neighbors among kernels used in NMDS |
|
compute spectral species distribution from original spectral species map |
|
Computes alpha diversity metrics based on spectral species |
|
computes beta diversity metrics |
|
this function reads PCA file and defines the spectral species for each pixel based on the set of cluster centroids defined for each iteration applies kmeans –> closest cluster corresponds to the "spectral species" |
|
compute spectral species for a subset of pixels provided in a list, each element corresponding to a polygon |
|
Computes continuum removal for matrix shaped data: more efficient than processing individual spectra the convex hull is based on the computation of the derivative between R at a given spectral band and R at the following bands |
|
Convert PCA into SSD based on previous clustering |
|
create a hdr file for a raster |
|
create a mask based on NDVI, Green reflectance and NIR reflectance NDVI (min) threshold eliminates non vegetated pixels Blue (max) threshold eliminates Clouds NIR (min) threshold eliminates shadows ! only valid if Optical data!! |
|
define output directory and create it if necessary |
|
define output directory and subdirectory and create it if necessary |
|
defines the number of pixels per iteration based on a trade-off between image size and sample size per iteration |
|
gets alpha diversity indicators from plot |
|
define Water Vapor bands based on spectral smapling of original image |
|
Extract bands of sparse pixels in image data cube |
|
extracts sample points from binary image file |
|
Extracts pixels coordinates from raster intersecting a vector. |
|
extracts pixels from image based on their coordinates |
|
perform filtering based on extreme values PCA identified through PCA |
|
Filter data prior to continuum removal: - values are expected to be real reflectance values between 0 and 10000 - negative values may occur, so a +100 value is applied to avoid negative - possibly remaining negative values are set to 0 - constant spectra are eliminated |
|
Computes BC dissimilarity for a given matrix |
|
get functional diversity metrics from dataframe This function was inspired from FD package |
|
get hdr name from image file name, assuming it is BIL format |
|
defines path for the spectral species raster file. Depends on preprocessing: - if standard dimensionality reduction (PCA, SPCA, MNF) was used, the corresponding directory is pointed - if no dimensionality reduction, or an alternative dimensionality reduction (spectral indices, tasseled cap... ) was used, user defined subdirectory is used - Diversity metrics can also be computed from a classification map |
|
computes shannon index from a distribution (faster than version implemented in vegan package) |
|
computes Simpson index from a distribution (faster than version implemented in vegan package) |
|
Computes alpha diversity metrics from distribution |
|
does the system work with little endians or big endians? |
|
Get GDAL info as a nested list |
|
gets rank of spectral bands in an image |
|
extract random subset of pixels from an image |
|
Gets sunlit pixels from SpectralSpecies_Distribution_Sunlit |
|
convert image coordinates from index to X-Y |
|
convert image coordinates from index to X-Y image coordinates are given as index = (ID.col-1) * total.lines + ID.row |
|
computes k-means from nb_partitions subsets taken from dataPCA |
|
applies results of ordination to full image based on nearest neighbors |
|
Get list of shapefiles in a directory |
|
maps alpha diversity indicators based on prior selection of PCs |
|
maps beta diversity indicator based on spectral species distribution |
|
maps functional diversity indicators based on prior selection of PCs |
|
maps spectral species based on PCA file computed previously |
|
applies mean filter to an image |
|
this function performs rescaling and either defines min and max from each feature in a data set, or applies the transformation based on a previously defined min and max |
|
Function to perform MNF |
|
this function |
|
#' computes NMDS # #' @param MatBCdist BC dissimilarity matrix #' @param dimMDS numeric. number of dimensions of the NMDS # #' @return BetaNMDS_sel #' @importFrom future plan multisession sequential #' @importFrom future.apply future_lapply #' @importFrom ecodist nmds #' @importFrom utils find #' @export |
|
computes nearest neighbors of a SSD subset with samples used for the adjustment of the ordination, then gets the coordinates of each window in the ordination space |
|
Function to perform PCA on a matrix |
|
Performs PCA for all images and create PCA file with either all or a selection of PCs |
|
Performs radiometric filtering based on three criteria: NDVI, NIR reflectance, Blue reflectance |
|
prepares Spectral species distribution (SSD) file and header |
|
prepare for writing sunlit proportion file |
|
prints an error message if problems occur |
|
converts a raster into BIL format as expected by biodivMapR codes |
|
reads subset of an ENVI BIL image |
|
Reads ENVI hdr file |
|
reads a subset from a binary image |
|
read specific image bands from image |
|
reads subset of lines from an image |
|
R equivalent of repmat (matlab) |
|
revert resolution in a HDR file |
|
remove constant bands |
|
Check if principal components are properly selected as expected by the method |
|
Check spectral band units and convert from nanometer to micrometer or from micrometer to nanometer |
|
defines the number of pieces resulting from image split |
|
ENVI functions |
|
splits a set of pixels to be sampled in an image based on number of lines, not number of samples |
|
convert image coordinates from X-Y to index |
|
updates an existing mask |
|
defines which byte should be read for each part of an image split in nbPieces |
|
defines which byte should be read for each part of an image split in nbPieces |
|
defines which byte should be written for each part of an image split in nbPieces |
|
writes ENVI hdr file |
|
writes an ENVI image corresponding to PCA |
|
This function writes a stars object into a raster file |
|
Writes a matrix or an array into a ENVI BIL raster |