Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tgrass

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)

spacetime

Classes and Methods for Spatio-Temporal Data

v1.2-4
GPL (>= 2)
Authors
Edzer Pebesma [aut, cre] (<https://orcid.org/0000-0001-8049-7069>), Benedikt Graeler [ctb], Tom Gottfried [ctb], Robert J. Hijmans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.