powered by
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 unsuperClass predict(object, img, ...)
unsuperClass object
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.
# NOT RUN { ## Load training data data(rlogo) ## Perform unsupervised classification uc <- unsuperClass(rlogo, nClasses = 10) ## Apply the model to another raster map <- predict(uc, rlogo) # }
Run the code above in your browser using DataLab