clRasterize: Rasterize Polygons in Parallels

Description Usage Arguments Value Examples

View source: R/clRasterize.R

Description

Function to chunk features in shapefile, rasterize in parallels, and assign values. Can be performed not in parallels, but is significantly slower and the user can just as easily use the raster::rasterize() function.

Usage

1
2
clRasterize(shp, mask.raster, shpValues, cl = NULL, layer = NULL,
  verbose = TRUE, plotMerged = TRUE)

Arguments

shp

Shapefile to rasterize; Shapefile or path to shapefile.

mask.raster

Raster object; NA-filled raster object or path to raster (NA's will be inserted).

shpValues

The values to be transferred to raster. Must be single number or vector of numbers the length of the number of spatial features. If vector of numbers, will be assigned in the same order as the order of features in shapefile.

cl

Cluster object created through parallel::makeCluster(n). Defaults to NULL, in which case function will not be run in parallels and will operate more slowly.

layer

Layer argument if required for importing shapefile through rgdal::readOGR(). Defaults to NULL. Only required if shp is path to file.

verbose

Show progress? Defaults to TRUE.

plotMerged

Plot resulting raster? Defaults to TRUE, but will change to FALSE if verbose==FALSE.

Value

features.

Examples

1

ssaxe-usgs/METsteps documentation built on May 5, 2019, 5:54 p.m.