This extracts or creates a new raster layer, whose intention is to be used as the rasterToMatch argument in further prepInputs calls.

rasterToMatch(x, ...)

# S4 method for Raster
rasterToMatch(x, studyArea, ...)

# S4 method for SpatialPolygonsDataFrame
rasterToMatch(x, studyArea, rasterToMatch, ...)

Arguments

x

A Raster Layer with correct resolution and origin.

...

Additional arguments

studyArea

A SpatialPolygon* object that will be sent to postProcess.

rasterToMatch

The raster to match in a fasterize call.

Value

A RasterLayer object.