raster2rgb: Produce an RGB image from a singleband raster file.

Description Usage Arguments Value Note Author(s)

View source: R/raster2rgb.R

Description

Internal function to create JPEG or PNG images from a singleband raster file. This function is used by s2_thumbnails, and it will be exported when it would be more generalised.

Usage

1
2
raster2rgb(in_rast, out_file = NULL, palette = "generic_ndsi",
  tmpdir = NA, scaleRange = NA)

Arguments

in_rast

Path of the input multiband raster.

out_file

(optional) Path of the output RGB JPEG image; if NULL (default), a RasterLayer will be returned.

palette

Path of the palette file to be used (cpt or txt), or character value of a builtin palette (the default "generic_ndsi").

tmpdir

(optional) Path where intermediate files (VRT) will be created. Default is a temporary directory.

Value

The path of the output image; alternatively, the output image as RasterLayer (if out_rast = NULL).

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2018) ranghetti.l@irea.cnr.it, Pascal Obstetar, (2019) pascal.obstetar@gmail.com


pobsteta/shiny-cnes documentation built on May 26, 2019, 2:31 a.m.