getRaster: Get a raster from the datacube

Description Usage Arguments Value

View source: R/getraster.R

Description

This function loads a raster grid file from the datacube and stores it into the data directory

Usage

1
getRaster(obj, path = "./data/", update = FALSE)

Arguments

obj

name of datacube object

path

path to store grid file

update

if TRUE, always get raster even if it allready exists

Value

the meta data of the blob object

This a wrapper function around link{pgblobs::getBlob}. It assumes that rasters in the datacube are stored as GeoTIFF files. This function gets the GeoTiff file from the datacube and converts it into a normal raster file. This function also assumes that the object name is the same as the basename of the raster file without extention.

This functions checks if the raster file allready exists, if it exists is does not load the file from the datacube since this is time consuming. If the user wants to update the file, use argument 'update=TRUE'

The GeoTiff will be deleted after writing the raster file.


jspijker/datacube documentation built on Oct. 26, 2019, 4:30 p.m.