ff_object: Raster and 'ff' file-backed arrays

Description Usage Arguments Details Value Examples

View source: R/ffraster.R

Description

Create an file-backed 'ff' object from a raster, or a raster-enabled file.

Usage

1
2
3
4
5
6
7
8
ff_object(x, readonly = TRUE, filename = NULL, ...)

## S3 method for class 'BasicRaster'
ff_object(x, readonly = TRUE, filename = NULL,
  ...)

## S3 method for class 'character'
ff_object(x, readonly = TRUE, filename = NULL, ...)

Arguments

x

raster or raster-able file

readonly

open in read-only mode (TRUE by default)

filename

path to file to create

...

arguments to methods

Details

When the object is created from a filename, ‘raster::brick' is used. The ’dim'ension for raster and for ff in this context always keeps degenerate singletons. Please get in touch if this causes you problems.

Value

'ff' object

Examples

1
2
3
4
5
f <- system.file("extdata", "raster", "sst.grd", package  = "ffraster")
ff_object(raster::brick(f))
if (interactive()) {
  arr <- ff_object(f, filename = "afile.grd")
 }

hypertidy/ffraster documentation built on May 24, 2019, 4:05 a.m.