Aller au contenu principal

Reclassify (Unique Value)

Usage

Perform one-to-one replacement by cell unique value: map specified old values to new values, for example 10 -> 1 and 20 -> 2. This is suitable for aggregating, recoding, and masking discrete categorical data, such as land-use codes, ecological types, and zone codes.

This tool is intended for rasters that already have explicit category codes. It only replaces cell values listed in the mapping table and does not reclassify continuous values. To classify values by numeric interval, use Reclassify (Classification).

Inputs And Outputs

  • Input: A raster file.
  • Output: A reclassified raster file. The spatial reference, extent, and resolution are the same as the input.

After reading the input raster, the current tool always extracts band 1 for unique value mapping. To process another band, first use Band Extraction to generate a single-band raster, and then run this tool.

Parameters

ParameterDescription
Input raster fileThe source raster for unique value mapping. It is usually a discrete-value raster, such as land use, classification results, administrative codes, or zone codes.
Unique value mapping dictionaryThe old-value to new-value mapping table. Enter one rule per line in the format old value-new value. For example, 10-1 replaces all cells whose value is 10 with 1.
Output raster fileThe output result path and file name. The output raster preserves the spatial reference, extent, and resolution of the input raster.

Steps

  1. Start the tool: Open the Geoprocessing Toolbox > go to Raster Tools > Raster Processing > Reclassify > start the Reclassify (Unique Value) tool pane.
  2. Select the input raster: In Input raster file, select the discrete-value raster to recode.
  3. Enter mapping rules: In Unique value mapping dictionary, enter mapping rules. Each line uses the format old value-new value.
  4. Set the output: Specify Output raster file, and confirm that the output path, format, and naming meet downstream requirements.
  5. Run and review the result: Click Run to generate the result. After completion, check whether the target category values, unmapped category values, and NoData areas meet expectations.

Notes

  • Cell values that do not appear in the mapping table remain unchanged. Only matched values are replaced.
  • Multiband rasters: the current tool maps band 1. To process another band, first use Band Extraction to extract the target band, and then run this tool.
  • Values in the mapping table are automatically parsed as numeric values when possible, including integers and floating-point values. Values that cannot be parsed are processed as original strings.
  • Unique value matching is exact. For continuous floating-point rasters, unique value reclassification is not recommended. Use Reclassify (Classification) to process by interval instead.
  • Output values should be compatible with the target raster data type. If decimal category values are required, the save format or advanced output settings should support floating-point values.

Example

  • Land-use aggregation:
10-1
11-1
20-2
21-2

These rules merge original values 10 and 11 into the new category 1, and original values 20 and 21 into the new category 2. Other unlisted cell values remain unchanged.