Clustering and Classification of Rasters in NextGIS Toolbox

Two tools for raster processing have been added to NextGIS Toolbox. Clustering and classification are fundamental methods for image processing. Now you can perform these operations outside of desktop GIS, quickly and easily.

Here’s  how you can use the tools and the explanation of the key differences between them.

Clustering

The algorithm divides all pixels into the specified number of categories (clusters), ensuring that pixels within each category are, on average, closer to each other in terms of their values than to pixels from other categories.

How to Run the Tool

Upload a GDAL-compatible raster. Be sure to specify the number of clusters to divide the image into.

You can also optionally define the maximum number of iterations, the initialization method, and the K-Means algorithm.

Run the Tool
Documentation

Classification

Unlike clustering, classification is a supervised algorithm. The characteristics of the classes are defined based on input training polygons. This way, the algorithm learns to distinguish one class from another.

Afterward, the algorithm assigns each pixel in the image to the class it most closely resembles.

For example, training polygons can be labeled as forest, water, and built-up areas. The algorithm analyzes each raster pixel and assigns it to one of these categories, based on which it resembles the most.

Preparing training polygons is called “ground-truthing.” Training polygons must represent typical pixels for each class. When creating these polygons, the analyst should follow these guidelines:

  • the reference area must be homogeneous;
  • it should contain a range of variability within the class;
  • multiple polygons can be used for a single class.

How to Run the Tool

Upload a raster and a vector layer of training polygons. The vector layer should contain a field in which each polygon is assigned a class (1, 2, 3…).

In the corresponding field, specify the attribute that contains the class number. If necessary, you can adjust the Random Forest algorithm’s parameters, such as the number of trees and the maximum tree depth.

Run the Tool
Documentation

Easy Geodata Processing with NextGIS Toolbox

NextGIS Toolbox is an extensive collection of powerful tools for geoprocessing and spatial data conversion.
The vast majority of the tools are free and available to everyone.
The option to deploy these tools on your own server is also available.

Learn more
NextGIS Toolbox

Comments are closed.