Reclassify |
|
Release 9.2
Last modified January 3, 2008 |
![]() ![]() ![]() 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.
The reclassification settings will persist if the input raster is changed. If the reclassification is not suitable, the reclassification can be reinitialized by any of the following:
In the Reclassify tool, if the entries or values in the remap table are altered in any way, the remap table will no longer update when a new input raster is selected.
When making edits to the remap table, be sure to refresh it before clicking outside of the Reclassification control. To refresh the table, select or edit a different value in the table. Also note that deleting all the entries will not refresh the remap table.
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