User Tools

Site Tools


api:dk11:delphi:gisclassification.tgis_classificationpixel

TGIS_ClassificationPixel class

DK11 for Delphi | GisClassification.TGIS_ClassificationPixel | Classes | Constructors | Methods | Properties

Class that enables performing advanced pixel data classification in the process of creating choropleth (thematic) maps.

Available also on: .NET | Java | ActiveX | Python.

Syntax

// Delphi
type
  TGIS_ClassificationPixel = class( TGIS_ClassificationAbstract )
  end;
// C++ Builder
class PASCALIMPLEMENTATION TGIS_ClassificationPixel : public TGIS_ClassificationAbstract
{
};

Inheritance

Constructors

Inherited Overrides Protected
Name Visibility Description
Create public Creates an object.

Methods

Inherited Overrides Protected
Name Visibility Description
AddClassBreak public Adds a new class break.
(Inherited from TGIS_ClassificationAbstract)
Classify public Performs the classification.
(Inherited from TGIS_ClassificationAbstract)
Classify(TGIS_ParamsList) public Performs the classification and applies to defined ParamsList.
(Inherited from TGIS_ClassificationAbstract)
doCreate protected Internal constructor.
(Inherited from TGIS_ClassificationAbstract)
EstimateNumClasses public Performs the pre-classification and sets NumClasses property.
(Inherited from TGIS_ClassificationAbstract)
MustCalculateStatistics public If True, statistics from layer assigned to classification need to be calculated.
(Inherited from TGIS_ClassificationAbstract)

Properties

Inherited Protected
Name Visibility Description
Band public Band from which values are used in classification.
ClassBreaks public Computed class breaks.
(Inherited from TGIS_ClassificationAbstract)
ColorRamp public The color ramp that is used to assign colors for class breaks.
(Inherited from TGIS_ClassificationAbstract)
ColorRampName public The name of the built-in color ramp that is used to assign colors for class breaks.
(Inherited from TGIS_ClassificationAbstract)
EndColor public Ending color used to generate ramp for class breaks.
(Inherited from TGIS_ClassificationAbstract)
ForceStatisticsCalculation public Forces the calculation of layer statistics.
(Inherited from TGIS_ClassificationAbstract)
Interval public Class interval size; default is 1.
(Inherited from TGIS_ClassificationAbstract)
Layer public Layer assigned to object.
(Inherited from TGIS_ClassificationAbstract)
Method public Classification method; NaturalBreaks by default.
(Inherited from TGIS_ClassificationAbstract)
NumClasses public Number of classes; default is 5, max is 30.
(Inherited from TGIS_ClassificationAbstract)
ShowLegend public If True, features will be shown in legend panel.
(Inherited from TGIS_ClassificationAbstract)
StartColor public Starting color used to generate ramp for class breaks.
(Inherited from TGIS_ClassificationAbstract)
Target public Indicates the data to be used for classification.
(Inherited from TGIS_ClassificationAbstract)

Remarks

Example

Pseudocode:

// while 'lyr' is opened raster layer
classifier = new TGIS_Classification( lyr );

// select one of available classification methods
classifier.Method = TGIS_ClassificationMethod.EqualInterval;

// specify number of classes
classifier.NumClasses = 5;

// specify attribute field with numerical values
classifier.Band = '1';

// check if layer's statistics require recalculation
if classifier.MustCalculateStatistics then
  lyr.Statistics.Calculate ;

// run classification process, visual properties will be applied automatically
classifier.Classify ;

// check generated class breaks values
// class breaks count equals NumClasses + 1
for i from 0 to classifier.NumClasses
  value = classifier.ClassBreaks[i];

2024/05/31 20:42

Page Tools