Description Usage Arguments Value Author(s)
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.
1 | raster.kmeans(x, k = 12, iter.max = 100, nstart = 10, geo = T, geo.weight = 1)
|
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. |
A raster object, of the same extent and coordinates as the input data, containing the cluster classification.
Grant Williamson
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.