RasterPackage: Convert a RasterLayer/RasterBrick to a cimg image/image list

RasterPackageR Documentation

Convert a RasterLayer/RasterBrick to a cimg image/image list

Description

The raster library stores its data as "RasterLayer" and "RasterBrick" objects. The raster package can store its data out-of-RAM, so in order not to load too much data the "maxpixels" argument sets a limit on how many pixels are loaded.

Usage

## S3 method for class 'RasterLayer'
as.cimg(obj, maxpixels = 1e+07, ...)

## S3 method for class 'RasterStackBrick'
as.imlist(obj, maxpixels = 1e+07, ...)

Arguments

obj

an object of class "RasterLayer"

maxpixels

max. number of pixels to load (default 1e7)

...

ignored

Author(s)

Simon Barthelme, adapted from the image method for RasterLayer by Robert J Hijmans


imager documentation built on May 29, 2024, 1:38 a.m.