ungzip: Decompress gzip file

Description Usage Arguments Value Examples

View source: R/ungzip.R

Description

Automatically decompress a gzip file so that it can be read directly by any of the raster import functions (raster, stack, brick). The gzip file is decompressed to a temporary file which is then read (while the original gzip file is kept). This is useful to keep and use directly large, gzip-compressed GIS files. Decompressed files are automatically deleted when cleaning temporary files.

Usage

1
ungzip(filepath)

Arguments

filepath

Path to the gzip file.

Value

Path to the decompressed file (which can then be read by raster functions).

Examples

1
2
3
4
5
## Not run: 
library(raster)
gisdata <- brick(ungzip("~/GISdata/climate.nc.gz"))

## End(Not run)

Pakillo/rgis documentation built on Oct. 15, 2020, 3:20 a.m.