ursa_dummy
returns georeferenced raster image with required number of bands. The value of such image has no sence in reality, but are suitable for R's examples.
ursa_dummy(nband = 3L, minvalue = 0, maxvalue = 255, mul = 1, elements = 8L,
bandname = NULL, nodata = TRUE, resetGrid=FALSE)
Object of class ursaRaster
Positive integer. Number of bands. Default is 3L.
Numeric of length 1. Minimal value for raster image. Default is 0
.
Numeric of length 1. Maximal value for raster image. Default is 255
.
Positive numeric. The scaling of the existing session grid. Value 1
means the actual pixel size. Value <1
decreases image size by increasing cell size. Value >1
decreases image size by increasing cell size. Default is 1
.
Positive integer. Maximal dimension of matrix, which is proportional to session grid. If elements
has small value then the resulting image is smooth, like low-resolution image. The elements
has big value, then the resulting image is like white noise.
Character vector or NULL
. Band names for created raster image. If NULL
, then band names are generated autimatically. Default is NULL
.
Numerical or logical. Set value, which is interpreted as 'no-data' flag. If logical and FALSE
then no no-data flag is assigned. If logical and TRUE
then value of no-data flag is generated automatically. If numeric, then no-data is assigned to value of this argument. Default is TRUE
.
Logical. Whether the grid will be reset to default before raster generation? If FALSE
then raster is generated in the sessional grid. If TRUE
then default parameters are used for raster and session. Default is FALSE
.
Nikita Platonov platonov@sevin.ru
Currently, the values are generated using runif
.
The value mul<1
speeds up raster generation.
session_grid(NULL)
a1 <- as.integer(ursa_dummy(nband=1,mul=1/16,elements=1e3)) ## white noise
## to avoid over-time during example check -- begin
display(a1,legend=NULL)
## to avoid over-time during example check -- end
a2 <- ursa_dummy()
print(a2)
display_brick(a2,decor=FALSE)
display_stack(a2,decor=FALSE)
display_rgb(a2,decor=FALSE)
Run the code above in your browser using DataLab