processTiles: Process a set of GRASS tiles in R.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Runs a function FUN for each tile in a GRASS raster and stores the output.

Usage

1
processTiles(tileindex, baserast, FUN, ...)

Arguments

tileindex

The tileindex object provided by createTiles()

baserast

The name of a GRASS raster file to be used as the basis for tile processing.

FUN

The function to process each tile with. This function should return the names of any GRASS rasters created, and R output if any.

...

Named arguments to FUN.

Details

A common task is to import a raster into R, do some processing, and either write out a new raster, save some results in R, or both. This series of functions makes it possible to do so for a raster that is too large to fit in available memory in R. See gparse for an example wrapping this process within a function.

Value

tileindex

A modified tileindex file.

Author(s)

Sarah Goslee <sarah.goslee@ars.usda.gov>

See Also

createTiles, mergeTiles, removeTiles, testFUN, gparse

Examples

1
2
3
4
5
6
7
8
## Not run: 
	# how to run
    tileindex <- createTiles("dem30", tilesize=tilesize) 
    tileindex <- processTiles(tileindex, baserast="dem30", FUN=testFUN)
    mergeTiles(tileindex, blocksize=blocksize, outname=outname)
    removeTiles(tileindex)
	
## End(Not run)

phiala/grassR documentation built on May 25, 2019, 2:55 a.m.