R: read or write tgrass (time-enabled grass) files

read.tgrass {spacetime} | R Documentation

## read or write tgrass (time-enabled grass) files

### Description

read or write tgrass (time-enabled grass) files

### Usage

    read.tgrass(fname, localName = TRUE, useTempDir = TRUE, isGeoTiff = TRUE)
    write.tgrass(obj, fname, ...)

### Arguments

`fname` | file name to read from, or write to
`localName` | logical; if TRUE, `fname` is a local file, else it is a the full path name to the file
`useTempDir` | logical: use a temporary directory for extraction?
`isGeoTiff` | logical: are the files in the tar.gz file GeoTIFFs?
`obj` | object to export, of class `STFDF` or `RasterStack`
`...` | arguments passed on to writeRaster

### Details

The tgrass format is a gzip'ed tar file (.tar.gz) that has geotiff files (with suffix .tif), and three files (list.txt, proj.txt and init.txt) describing the file names and time slices, coordinate reference system, and dimensions

### Value

`read.tgrass` returns an object of class `RasterStack`, `writegrass` returns nothing

### Author(s)

Edzer Pebesma; time-enabled grass by Soeren Gebbert

### References

http://dx.doi.org/10.1016/j.envsoft.2013.11.001

### Examples

    ## Not run:
    library(spacetime)
    r = read.tgrass("precipitation_1950_2011_yearly.tar.gz", useTempDir = FALSE)
    write.tgrass(r, "myfile.tar.gz")

    ## End(Not run)

[Package spacetime version 1.2-2 Index]