Predict a raster map based on a unsuperClass model fit.
applies a kmeans cluster model to all pixels of a raster. Useful if you want to apply a kmeans model of scene A to scene B.
## S3 method for class 'unsuperClass' predict(object, img, ...)
object |
unsuperClass object |
img |
Raster object. Layernames must correspond to layernames used to train the superClass model, i.e. layernames in the original raster image. |
... |
Further arguments passed to writeRaster. |
## Load training data data(rlogo) ## Perform unsupervised classification uc <- unsuperClass(rlogo, nClasses = 10) ## Apply the model to another raster map <- predict(uc, rlogo)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.