Wrapper to reclass a raster using a vector of cut breaks.

spClassifyRast(
  rastfn,
  cutbreaks,
  bnd = NULL,
  bnd_dsn = NULL,
  bnd.filter = NULL,
  buffdist = NULL,
  nodataclass = NULL,
  gethist = FALSE,
  savedata_opts = NULL
)

Arguments

rastfn

String. Path name of raster to classify.

cutbreaks

Integer vector. Breaks to use for classifying (e.g., c(0,50,75) uses function in calc: 'ifelse (A >= 0 & A < 50, 1, ifelse (A >= 50 & A < 75, 2, ifelse (A >= 75, 3, 255)))'

bnd

sf R object or String. Boundary to clip raster (optional). Can be a spatial sf object, full pathname to a shapefile, or name of a layer within a database.

bnd_dsn

String. Name of data source name with bnd_layer, if in a database.

bnd.filter

String. Optional filter of bnd_layer.

buffdist

Number. The distance to buffer the polygon before clipping raster, in units of raster.

nodataclass

Integer. Class number to assign NODATA values to.

gethist

Logical. If TRUE, returns a histogram of pixel values by class.

savedata_opts

List. See help(savedata_options()) for a list of options. Only used when savedata = TRUE.

Value

Data.

Author

Tracey S. Frescino