User Tools

Site Tools


samples:samples:classification

Table of Contents

Classification sample

Documentation | Samples | Classification

Summary

Classification sample — demonstrates thematic data classification of vector and raster (pixel) layers using the TatukGIS TGIS_ClassificationAbstract API.

Description

What the sample shows:

  • Loading a raster layer (DEM/grid) into the viewer
  • Creating reclassification rules to remap pixel values to new ranges
  • Two reclassification strategies:
  • Table-based: specifying input range (min/max) → output value mappings in a data grid
  • Altitude zones: using predefined elevation zones (sea level, low, mid, high, alpine)
  • Applying reclassification rules to generate a new classified raster layer
  • Handling “no data” values (pixels with no valid data) during reclassification
  • Displaying progress during reclassification (ProgressBar)
  • Visualizing the reclassified result with a legend showing new classes
  • Comparing original raster with reclassified output side-by-side
  • Using data grid interface for interactive rule definition
  • Supporting both manual and preset classification schemes

This sample illustrates use of:

Name Description
TGIS_ClassificationAbstract.TargetIndicates the data used for classification; empty by default.
TGIS_ClassificationAbstract.NumClassesNumber of classes; default is 5, maximum is 30.
TGIS_ClassificationAbstract.StartColorStarting color used to generate the color ramp for class breaks; White by default.
TGIS_ClassificationAbstract.EndColorEnding color used to generate ramp for class breaks; Black by default.
TGIS_ClassificationAbstract.ShowLegendIf True, classes are shown in the legend panel; True by default.
TGIS_ClassificationAbstract.MethodClassification method; NaturalBreaks by default.
TGIS_ClassificationAbstract.IntervalClass interval size; default value is 1.
TGIS_ClassificationAbstract.ClassifyPerforms the classification.
TGIS_ClassificationAbstract.MustCalculateStatisticsIndicates whether statistics for the assigned layer must be calculated.
TGIS_ClassificationVector.StartSizeStarting size or width for generating Params section; default value is 1.
TGIS_ClassificationVector.EndSizeEnding size or width for generating Params section; default value is 480.
TGIS_ClassificationVector.ClassIdFieldIf not empty, the attribute field with the specified name is populated with class identifier values.
TGIS_ClassificationVector.RenderTypeVisual property affected during classification; Color by default.

Code

This sample is available on the following platforms (click to view the source code on GitHub):

2026/07/05 05:38

Page Tools