BatchAggregate: Batch aggregate raster objects

Description Usage Arguments Value Examples

Description

Takes a raster object and a vector of aggrgation values calculates resampling a writes to a folder

This function mainly exists as it seems difficult to use parallel cores to resample a raster object. Hence paralle the different scale functions and use the outputs in seperate functions.

Usage

1
BatchAggregate(inRaster, scaleVector, outNames, NoCores)

Arguments

inRaster

A raster object to be resampled

scaleVector

A vector of the different resampling factors to be applied

outNames

a string of folder location and stack names used for writing outputs, will have the aggregation values appended

NoCores

Number of Cores to used to parallel processing

Value

raster objects written to file following resampling.

Examples

1
2
3
#resolutionVector  <-2:8
 #outName <- "F:\\Projects\\shrub_cover_paper\\pixelSizeTests\\ras_stack"
 #returns:  "F:\Projects\shrub_cover_paper\pixelSizeTests\ras_stack8.tif"  "F:\Projects\shrub_cover_paper\pixelSizeTests\ras_stack7.tif" etc

Tomhigg/fracCover documentation built on May 9, 2019, 5:11 p.m.