R/convertUnwantedLCC2.R
convertUnwantedLCC2.RdThis will search around the pixels on rstLCC that have
classesToReplace, and search in iteratively increasing
radii outwards for other Land Cover Classes than the those indicated in
classesToReplace.
.
convertUnwantedLCC2(
classesToReplace = 34:36,
rstLCC,
nIterations = 6,
defaultNewValue = NA,
invalidClasses = NA
)Integer vector of classes that are are to be replaced, e.g., 34, 35, 36 on LCC2005, which are burned young, burned 10 year, and cities.
raster of land-cover class, e.g., LCC2005
the number of iterations to perform
the value to assign a pixel in classesToReplace if no valid pixel
is closer after nIterations
classes that are not valid options
A rasterLayer with values in classesToReplace converted to adjacent values or NA.