Reclassify |
|
Release 9.3
Last modified September 7, 2011 |
Print all topics in : "Reclass (Spatial Analyst)" |
Reclassifies (or changes) the values in a raster.
Usage tips
Command line and Scripting
The input raster must have valid statistics. If the statistics do not exist, they can be created in two ways. The first is to right-click the raster in ArcCatalog and click Calculate Statistics. The other is to open the Data Management Tools toolbox, Raster toolset, Calculate Statistics tool in ArcToolbox.
The remap table can be stored for future use with the Save button. Use the Load button to open the remap tables you created previously with the Save button.
Only remap tables created by the tool should be used in Reclassify.
By default, the input raster will be classified into nine classes for the Reclassification table.
If the input raster is a layer, the old values of the reclassification will be obtained from the renderer. If the renderer is stretched, the reclassification will default to 255 classes.
Once the remap table of the reclassification has been modified, if a new input raster is selected the values will not be updated. If the reclassification is not suitable for the new raster, a default reclassification can be reinitialized by:
The Reclassify tool has a precision control that manages how decimal places are treated.
The output raster will always be of integer type.
When using the Reclassify tool as part of a model:
The following environment settings affect this tool:
Command line syntax
An overview of the Command Line window
Reclassify_sa <in_raster> <reclass_field> <remap> <out_raster> {DATA | NODATA}
Parameter | Explanation | Data Type |
<in_raster> |
Input raster to be reclassified. |
Composite Geodataset |
<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 raster to be created. |
Raster Dataset |
{DATA | NODATA} |
Denotes whether missing values in the reclass table retain their value or get mapped to NoData.
|
Boolean |
Reclassify_sa c:/data/ras_1 Value "0.000000 30.000000 1;31.000000 270.000000 2;271.000000 365.000000 3" c:/data/final_1 DATA
Scripting syntax
About getting started with writing geoprocessing scripts
Reclassify_sa (in_raster, reclass_field, remap, out_raster, missing_values)
Parameter | Explanation | Data Type |
in_raster (Required) |
Input raster to be reclassified. |
Composite Geodataset |
reclass_field (Required) |
Field denoting the values that will be reclassified. |
Field |
remap (Required) |
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 (Required) |
The raster to be created. |
Raster Dataset |
missing_values (Optional) |
Denotes whether missing values in the reclass table retain their value or get mapped to NoData.
|
Boolean |
# Reclassify.py # Description: # Reclassifies (or changes) the values in a raster on a # cell-by-cell basis within the analysis window. # Requirements: None # Author: ESRI # Date: Sept 6, 2005 # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() try: # Set the input files inRaster = "c:/data/ras_1" # Set the output raster name outRaster = "c:/data/final_1" # Check out ArcGIS Spatial Analyst extension license gp.CheckOutExtension("Spatial") # Set the reclassify ranges reclassifyRanges = "0.000000 30.000000 1;31.000000 270.000000 2;271.000000 365.000000 3" # Process: Reclassify gp.Reclassify_sa(inRaster, "Value", reclassifyRanges, outRaster, "DATA") except: # If an error occurred while running a tool, then print the messages print gp.GetMessages()
Map Algebra syntax
Not available
ArcObjects syntax
See ReclassByRemap