pack_minmax | R Documentation |
This function can be used to define packed exports in write_ncdf
and write_tif
. It will generate scale and offset values with maximum precision (unless simplify=TRUE).
pack_minmax(type = "int16", min, max, simplify = FALSE)
type |
target data type of packed values (one of "uint8", "uint16", "uint32", "int16", or "int32") |
min |
numeric; minimum value(s) of original values, will be packed to the 2nd lowest value of the target data type |
max |
numeric; maximum value(s) in original scale, will be packed to the highest value of the target data type |
simplify |
logical; round resulting scale and offset to power of 10 values |
Nodata values will be mapped to the lowest value of the target data type.
Arguments min and max must have length 1 or length equal to the number of bands of the data cube to be exported. In the former case, the same values are used for all bands of the exported target cube, whereas the latter case allows to use different ranges for different bands.
Using simplify=TRUE will round scale values to the next smaller power of 10.
ndvi_packing = pack_minmax(type="int16", min=-1, max=1)
ndvi_packing
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.