Available with 3D Analyst license.
Summary
Reclassifies (or changes) the values in a raster.
Usage
The input raster must have valid statistics. If the statistics do not exist, they can be created using the Calculate Statistics tool in the Data Management Tools toolbox.
If a range of values is to be reclassed, the ranges should not overlap except at the boundary of two input ranges. Where overlapping occurs, the higher end of the lower input range is inclusive, and the lower end of the higher input range is exclusive.
For example, if two ranges are specified, such as reclassifying values 1 to 5 as 100 and values 5 to 10 as 200, an input value less than or equal to 5 will be assigned the value 100 in the output, and an input value that is larger than 5, such as 5.01, will be assigned to 200.
From the tool, the remap table can be saved as an INFO table for future use with the Save option.
Use the Load option to reload remap tables you created previously with the Save button.
It is recommended to only load tables previously saved by the Reclassify tool. The table format is specific and must contain the fields FROM, TO, OUT, and MAPPING.
When the input raster is a layer from the Table of Contents, the default reclassification table will import the unique values or classified break values as specified by the layer symbology; otherwise, the reclassification table will default to natural breaks with nine classes.
Once the remap table of the reclassification has been modified, the table will not be updated if a new input raster is selected. If the reclassification is not suitable for the new raster, a new reclassification can be reinitialized by:
- Edit or select a field for the reclass field to invoke a new default reclassification.
- Select and delete the remap entries and manually add the new values.
- Select the unique or classification options to generate a new reclassification.
This tool has a precision control that manages how decimal places are treated.
When using the Reclassify tool as part of a model:
- If the input to the tool is derived data from a tool that isn't already run, the remap parameter in the Reclassify tool will be empty until the preceding tool is run and the model is validated. To avoid this, always run preceding tools before connecting their output variables as input to the Reclassify tool. Alternatively, you can create a custom reclassification table by adding entries.
- If exposing the reclassification table as a model parameter, the reclass field must be exposed as a variable; however, it does not need to be set as a model parameter. If the field is not exposed as a variable, the classify and unique values buttons will be disabled in the model tool dialog box.
By default, this tool will take advantage of multi-core processors. The maximum number of cores that can be utilized is limited to 4.
If you wish the tool to use fewer cores, use the parallelProcessingFactor environment setting.
Syntax
Reclassify_3d (in_raster, reclass_field, remap, out_raster, {missing_values})
Parameter | Explanation | Data Type |
in_raster | The input raster to be reclassified. | Raster Layer |
reclass_field | Field denoting the values that will be reclassified. | Field |
remap | A remap list that defines how the values will be reclassified. The remap list is composed of three components: From, To, and New values. Each row in the remap list is separated by a semicolon, and the three components are separated by spaces. For example: "0 5 1;5.01 7.5 2;7.5 10 3" | Remap |
out_raster | The output reclassified raster. The output will always be of integer type. | Raster Dataset |
missing_values (Optional) | Denotes whether missing values in the reclass table retain their value or get mapped to NoData.
| Boolean |
Code Sample
Reclassify example 1 (Python window)
The following example shows how to reclassify a raster into seven classes.
import arcpy
from arcpy import env
env.workspace = "C:/sapyexamples/data"
arcpy.Reclassify_3d("C:/data/landuse", "VALUE",
"1 9;2 8;3 1;4 6;5 3;6 2;7 1",
"C:/output/outremap","DATA")
Reclassify example 2 (stand-alone script)
This example reclassifies the input raster based on the values in a string field.
# Name: Reclassify_3d_Ex_02.py
# Description: Reclassifies the values in a raster.
# Requirements: 3D Analyst Extension
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inRaster = "landuse"
field = "VALUE"
remapString = "1 9;2 8;3 1;4 6;5 3;6 2;7 1"
outRaster = "C:/output/reclass3d"
# Check out the ArcGIS 3D Analyst extension license
arcpy.CheckOutExtension("3D")
# Execute Reclassify
arcpy.Reclassify_3d(inRaster, field, remapString, outRaster, "DATA")
Environments
Licensing Information
- ArcGIS for Desktop Basic: Requires 3D Analyst or Spatial Analyst
- ArcGIS for Desktop Standard: Requires 3D Analyst or Spatial Analyst
- ArcGIS for Desktop Advanced: Requires 3D Analyst or Spatial Analyst