Description Usage Arguments Value
View source: R/pr_check_inputs.R
helper function used to check consistency of pr_convert arguments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | pr_check_inputs(
in_file,
out_folder,
out_filebase,
out_format,
base_georef,
fill_gaps,
VNIR,
SWIR,
FULL,
source,
join_priority,
ATCOR,
ATCOR_wls,
PAN,
CLOUD,
LC,
GLINT,
ANGLES,
LATLON,
ERR_MATRIX,
apply_errmatrix,
overwrite,
in_L2_file,
selbands_vnir,
selbands_swir,
indexes,
cust_indexes,
keep_index_cube
)
|
in_file |
'character' full path of input HDF5 file |
out_folder |
'character' full path to output folder |
out_filebase |
'character' if "auto", output file names are based on filename of the input prisma file, with appropriate suffixes. If a different string is provided, it is used as prefix instead of the input file name, Default: "auto" |
out_format |
'character“ ["GTiff" | "ENVI"], Output format, Default: 'GTiff' |
base_georef |
'logical' if TRUE, apply base georeferencing on L1, L2B/C data, using the "Georeference from input GLT" procedure explained here: https://www.harrisgeospatial.com/docs/backgroundgltbowtiecorrection.html, Default: TRUE |
fill_gaps |
'logical' if TRUE, when georeferencing on L1, L2B/C data, substitute missing values with results of a 3x3 focal filter on the georeferenced data, Default: FALSE |
VNIR |
'logical' if TRUE, create the VNIR image, Default: FALSE |
SWIR |
'logical' if TRUE, create the SWIR image, Default: FALSE |
FULL |
'logical' if TRUE, create a single multispectral image from VNIR and SWIR, Default: FALSE |
source |
'character' ["HC0" | "HRC"], Considered Data Cub, Default: 'HCO' |
join_priority |
'character' ["VNIR" | "SWIR"], spectrometer to consider when join_spectra = TRUE, Default: SWIR - ignored if join_spectra is FALSE. Default: "SWIR" |
ATCOR |
logical' if TRUE, create the text files required to run ATCOR, Default: FALSE; |
ATCOR_wls |
NULL, or 'numeric' If NULL the only ATCOR wvl file created is the one containing Nominal wavelengths. If a numeric vector is provided, then one different wvl file is created for each selected COLUMN selected (e.g., if providing 'ATCOR_wls = c(200, 800)', then the wavelengths and FWHMs related to columns 200 and 800 are saved.) |
PAN |
'logical' if TRUE, also save PAN data, default: FALSE |
CLOUD |
'logical' if TRUE, also save CLOUD MASK mask data, Default: FALSE (Ignored for L2 data). It is coded as: 0 for not cloudy pixel 1 for cloudy pixel 10 = for not of all previous classification 255 = error |
LC |
'logical' if TRUE, also save the LAND COVER data, default: FALSE (Ignored for L2 data) It is coded as: 0 for water pixel 1 for snow pixel (and ice) 2 for not-vegetated land pixel :bare soil) 3 for crop and rangeland pixel 4 for forest pixel 5 for wetland pixel 6 for not-vegetated land pixel :urban component 10 for not of all previous classification 255 for error |
GLINT |
'logical' if TRUE, also save GLINT mask data, default: FALSE (Ignored for L2 data) It is coded as: 0 for not sun glint 1 for sun glint 10 for not of all previous classification 255 = error |
ANGLES |
if TRUE, also save the ACQUISITION ANGLES data. ANGLES data are saved as a 3-band raster. Band 1 contains "viewzen_ang", Band 2 contains "relaz_ang" and Band 3 contains "solzen_ang"), default: FALSE |
LATLON |
if TRUE, also save the LATITUDE and LONGITUDE data. LATLON data are saved as a 2-band raster. Band 1 contains "Lat", Band 2 contains "Lon", Default: FALSE |
ERR_MATRIX |
'logical' if TRUE, also save the SATURATION ERROR MATRIX Data, Default: FALSE SATURATION ERROR MATRIX is coded as: 0=pixel ok; 1=DEFECTIVE PIXEL from KDP 2= Pixel in saturation. 3= Pixel with lower radiometric accuracy, due to coregistration effects. 4= Pixel becomes NaN or Inf during processing. |
apply_errmatrix |
'logical' if TRUE, set pixels with values above 0 in the SATERR_MATRIX data cube (for L1) or ERRMATRIX cube (for L2) to NA, Default: FALSE |
overwrite |
'logical' if TRUE, existing files are overwritten, Default: FALSE |
in_L2_file |
'character' full path of an L2B/C file to be used to extract georeferencing info and angles for a corresponding L1 file. If not NULL, and 'in_file' is a L1 file, the LAT and LON fields used for bowtie georeferencing are taken from the L2 file instead than from the L1 file. The ANGLES data are also retrieved from the L2 file if requested. |
selbands_vnir |
'numeric array' containing wavelengths (in nanometers) of bands that should be extracted from the VNIR data cube. If not NULL, only the bands with wavelengths closest to these values are extracted, Default: NULL |
selbands_swir |
'numeric array' containing wavelengths (in nanometers) of bands that should be extracted from the SWIR data cube. If not NULL, only the bands with wavelengths closest to these values are extracted, Default: NULL |
indexes |
'character' array of names of indexes to be computed. You can see a list of available indexes using command 'pr_listindexes()', or see the corresponding table at: https://irea-cnr-mi.github.io/prismaread/articles/Computing-Spectral-Indexes.html, #nolint Default:NULL |
cust_indexes |
'character' named list containing names and formulas of custom indexes to be computed. The indexes formulas must be computable R formulas, where bands are referred to by the prefix "b", followed by the wavelength (e.g.,'cust_indexes = list(myindex1 = "R500 / R600", myindex2 = "(R800 - R680) / (R800 + R680)")', Default:NULL |
keep_index_cube |
'logical', if TRUE, and spectral indexes were computed, keep in the output folder the hyperspectral cube used to compute the indexes (containing only wavelengths required to compute the desired indexes). The file takes a "_INDEXES" suffix. If FALSE, put the file in tempdir so that it is deleted automatically afterwards. Default: FALSE |
Upon success of all checks, the input hdf file, opened using 'hdf5r::H5File'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.