Convert nativeRaster images to/from other R objects

nr_to_raster(nr)

raster_to_nr(ras)

nr_to_array(nr)

array_to_nr(arr)

Arguments

nr

nativeRaster object

ras

standard R raster i.e. a character matrix of hex colour values

arr

3d numeric array representing R,G,B,A values with dimensions [nrow, ncol, 4] or [nrow, ncol, 3]. Each value is in range [0,1].