Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.unsuperClass

Predict a raster map based on a unsuperClass model fit.


Description

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.

Usage

## S3 method for class 'unsuperClass'
predict(object, img, ...)

Arguments

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.

Examples

## Load training data
data(rlogo)

## Perform unsupervised classification
uc  <- unsuperClass(rlogo, nClasses = 10)

## Apply the model to another raster
map <- predict(uc, rlogo)

RStoolbox

Tools for Remote Sensing Data Analysis

v0.2.6
GPL (>= 3)
Authors
Benjamin Leutner [cre, aut], Ned Horning [aut], Jakob Schwalb-Willmann [aut], Robert J. Hijmans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.