DK11 for Delphi | GisClassification.TGIS_Reclassification | Classes | Constructors | Methods | Properties | Events
A class that allows reclassification of grid layer values.
// Delphi type TGIS_Reclassification = class( TGIS_Object ) end;
// C++ Builder class PASCALIMPLEMENTATION TGIS_Reclassification : public TGIS_Object { };
Name | Visibility | Description | |
---|---|---|---|
Create | public | Initializes a new instance of the TGIS_Reclassification class. | |
Name | Visibility | Description | |
---|---|---|---|
AddReclassRange(Single; Single; Single) | public | Adds a new reclassification range definition. | |
AddReclassRange(Single; Single; Single; TGIS_Color) | public | Adds a new reclassification range definition. | |
AddReclassValue(Single; Single) | public | Adds a new reclassification value definition. | |
AddReclassValue(Single; Single; TGIS_Color) | public | Adds a new reclassification value definition. | |
ClearReclassDefinitions | public | Clears all reclassification definitions (ranges & values). | |
Generate | public | Fiils the _destination grid layer with reclassified values. | |
Name | Visibility | Description | |
---|---|---|---|
ReclassNoDataValue | public | The new value to be assigned to the input NoData value. | |
UseNoDataForMissingValues | public | Indicates whether cell values outside the defined ranges are reclassified to NoData (true by default), or remain intact (false). | |
What is Grid Reclassification?
Grid reclassification is the process of reassigning values in a raster dataset based on specified criteria. It is commonly used to simplify or categorize data, such as converting a continuous range of elevation values into distinct altitude zones. This technique is invaluable for various analyses, including environmental monitoring, land use planning, and risk assessment.
Key features of the Reclassification tool
Using the _useAltitudeMapZones parameter
The _useAltitudeMapZones parameter in the Generate method allows you to specify whether the reclassification should be based on predefined reclass definitions or altitude map zones defined in the TGIS_LayerPixel.Params.Pixel.AltitudeMapZones property.
By setting _useAltitudeMapZones to True, the tool will utilize altitude zones instead of the reclass ranges and values you may have defined. This can be particularly useful when working with elevation data already segmented into meaningful zones. However, it's important to note that enabling this option will delete any existing reclassification definitions, as the process will rely solely on the altitude map zones.
The class will try to assign new values from the legend part of the altitude map zones only if they are all integer values, otherwise it will assign new values starting from 0.
How to use the TGIS_Reclassification class
// Create an instance of TGIS_Reclassification Reclassifier = TGIS_Reclassification.Create; // Define reclassification ranges or values reclass.AddReclassRange(0.0, 100.0, 1.0, TGIS_Color.Red); reclass.AddReclassValue(150.0, 2.0, TGIS_Color.Blue); // Set NoData handling reclass.UseNoDataForMissingValues := True; reclass.ReclassNoDataValue := -9999.0; // Apply Reclassification based on the reclassification definitions reclass.Generate(sourceLayer, extent, destinationLayer); // Or using altitude map zones reclass.Generate(sourceLayer, extent, destinationLayer, True);
The Reclassification tool is also available in TatukGIS Pipelines