Title: | Create Native raster Files With ff |
---|---|
Description: | Couplings between raster and ff files. |
Authors: | Michael D. Sumner [aut, cre] |
Maintainer: | Michael D. Sumner <[email protected]> |
License: | GPL-3 |
Version: | 0.0.2.9001 |
Built: | 2024-10-30 03:16:07 UTC |
Source: | https://github.com/hypertidy/tidyff |
activate
active(x, value) ## S3 method for class 'tidyff' activate(.data, what)
active(x, value) ## S3 method for class 'tidyff' activate(.data, what)
x |
object |
value |
activation name |
.data |
object with sub-element |
what |
sub-element to activate |
The dimension order as used by ff and raster native grid, see 'raster::writeRaster'. The raster package uses the named conventions "BSQ", "BIL" and "BIP" which are domain-specialized ways to record the dimension order of (virtual) 3D arrays. They stand for "band sequential" "band interleaved" and ... correspond to c(1, 2, 3) etc. etc.
dim_order(x, ...) ## S3 method for class 'BasicRaster' dim_order(x, ...) ## S3 method for class 'character' dim_order(x, ...)
dim_order(x, ...) ## S3 method for class 'BasicRaster' dim_order(x, ...) ## S3 method for class 'character' dim_order(x, ...)
x |
filename or raster object or ff object |
... |
ignored |
This function always returns an integer vector indicating the order of the dims of a 'length(dim_order(x))' array oriented relative to the R array convention.
integer vector of dimension positions (1-based)
r <- raster::raster(volcano) dim_order(r) w <- raster::writeRaster(r, raster::rasterTmpFile(), bandorder = "BIP") dim_order(w) dim_order(raster::filename(w))
r <- raster::raster(volcano) dim_order(r) w <- raster::writeRaster(r, raster::rasterTmpFile(), bandorder = "BIP") dim_order(w) dim_order(raster::filename(w))
Create an file-backed 'ff' object from a raster, or a raster-enabled file.
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, ...)
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, ...)
x |
raster or raster-able file |
readonly |
open in read-only mode (TRUE by default) |
filename |
path to file to create |
... |
arguments to methods |
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.
'ff' object
f <- system.file("extdata", "raster", "sst.grd", package = "tidyff") ff_object(raster::brick(f)) if (interactive()) { arr <- ff_object(f, filename = "afile.grd") }
f <- system.file("extdata", "raster", "sst.grd", package = "tidyff") ff_object(raster::brick(f)) if (interactive()) { arr <- ff_object(f, filename = "afile.grd") }
ff type from raster type
ff_type(x, ...) ## S3 method for class 'character' ff_type(x, ...) ## S3 method for class 'BasicRaster' ff_type(x, ...) ## S3 method for class 'raster_ini' ff_type(x, ...)
ff_type(x, ...) ## S3 method for class 'character' ff_type(x, ...) ## S3 method for class 'BasicRaster' ff_type(x, ...) ## S3 method for class 'raster_ini' ff_type(x, ...)
x |
filename, raster object, or ini object |
... |
ignored |
type of ff, see 'ff::vmode'
hyper filter
## S3 method for class 'tidyff' hyper_filter(x, ...)
## S3 method for class 'tidyff' hyper_filter(x, ...)
x |
object |
... |
arguments as per 'tidync::hyper_filter' |
Read the configuration file in raw list form, you can use either the filename (.grd) or a raster object.
ini_file(x) ## S3 method for class 'character' ini_file(x) ## S3 method for class 'BasicRaster' ini_file(x)
ini_file(x) ## S3 method for class 'character' ini_file(x) ## S3 method for class 'BasicRaster' ini_file(x)
x |
file name or raster |
ini object from raster native binary
f <- system.file("extdata", "raster", "sst.grd", package = "tidyff") ini_file(f)
f <- system.file("extdata", "raster", "sst.grd", package = "tidyff") ini_file(f)
tidyff.
Tidy ff
tidyff(x, ...)
tidyff(x, ...)
x |
object |
... |
ignored |