raster.kmeans: K-means Classification on a RasterStack

Description Usage Arguments Value Author(s)

View source: R/rasterkmeans.r

Description

This function performs a k-means unsupervised classification of a stack of rasters. Number of clusters can be specified, as well as number of iterations and starting sets. An optional geographic weighting system can be turned on that constrains clusters to a geographic area, by including coordinates in the clustering. All variables are normalized before clustering is performed.

Usage

1
raster.kmeans(x, k = 12, iter.max = 100, nstart = 10, geo = T, geo.weight = 1)

Arguments

x

A RasterStack object, or a string pointing to the directory where all raster layers are stored. All rasters should have the same extent, resolution and coordinate system.

k

Number of clusters to classify to.

iter.max

Maximum number of iterations allowed

nstart

Number of random sets to be chosen.

geo

True/False - should geographic weighting be used?

geo.weight

A weighting multiplier indicating the strength of geographic weighting relative to the other variables. A value of 1 gives equal weight.

Value

A raster object, of the same extent and coordinates as the input data, containing the cluster classification.

Author(s)

Grant Williamson


ozjimbob/ecbtools documentation built on Jan. 18, 2021, 7:39 p.m.