ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Reclassify

Available with Spatial Analyst license.

Available with 3D Analyst license.

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Reclassifies (or changes) the values in a raster.

Usage

  • 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 previously created 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.

  • If the input raster has an attribute table, it will be used to create the initial reclassification table. If the input raster does not have an attribute table, you can run the Build Raster Attribute Table tool from the Data Management toolbox to build one before inputting the raster into the Reclassify tool. Otherwise, when you input the raster, a reclassification table will be created for it by first applying geoprocessing environment settings, such as Extent and Cell size, and scanning the raster.

    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. The current geoprocessing environment settings will be ignored when importing those values. 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 one of the following methods

    • 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.

  • From scripting, when the output raster is written into a folder, it will be in TIFF format.

  • Input raster formats with double-precision (64 bit) cell values are supported.

  • 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 used is four.

    If you want the tool to use fewer cores, use the parallelProcessingFactor environment setting.

  • See Analysis environments and Spatial Analyst for additional details on the geoprocessing environments that apply to this tool.

Syntax

Reclassify(in_raster, reclass_field, remap, {missing_values})
ParameterExplanationData Type
in_raster

The input raster to be reclassified.

Raster Layer
reclass_field

Field denoting the values that will be reclassified.

Field
remap

The Remap object is used to specify how to reclassify values of the input raster.

There are two ways to define how the values will be reclassified in the output raster: RemapRange and RemapValue. Either ranges of input values can be assigned to a new output value, or individual values can be assigned to a new output value.

The following are the forms of the remap objects.

  • RemapRange (remapTable)
  • RemapValue (remapTable)
Remap
missing_values
(Optional)

Denotes whether missing values in the reclass table retain their value or get mapped to NoData.

  • DATA —Signifies that if any cell location on the input raster contains a value that is not present or reclassed in a remap table, the value should remain intact and be written for that location to the output raster. This is the default.
  • NODATA —Signifies that if any cell location on the input raster contains a value that is not present or reclassed in a remap table, the value will be reclassed to NoData for that location on the output raster.
Boolean

Return Value

NameExplanationData Type
out_raster

The output reclassified raster.

The output will always be of integer type.

Raster

Code sample

Reclassify example 1 (Python window)

The following examples show several ways of reclassifying a raster.

import arcpy
from arcpy import env  
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"

outReclass1 = Reclassify("landuse", "Value", 
                         RemapValue([[1,9],[2,8],[3,1],[4,6],[5,3],[6,3],[7,1]]))
outReclass1.save("C:/sapyexamples/output/landuse_rcls")

outReclass2 = Reclassify("slope_grd", "Value", 
                         RemapRange([[0,10,"NODATA"],[10,20,1],[20,30,2],
                                     [30,40,3],[40,50,4],[50,60,5],[60,75,6]]))
outReclass2.save("C:/sapyexamples/output/slope_rcls")

outReclass3 = Reclassify("pop_density", "Value", 
                         RemapRange([[10,10,1],[10,20,2],[20,25,3],
                                     [25,50,4],[50,]]), "NODATA")
outReclass3.save("C:/sapyexamples/output/popden_rcls")
Reclassify example 2 (stand-alone script)

This example reclassifies the input raster based on the values in a string field.

# Name: reclassify_example02.py
# Description: Reclassifies the values in a raster.
# Requirements: Spatial Analyst Extension

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *

# Set environment settings
env.workspace = "C:/sapyexamples/data"

# Set local variables
inRaster = "landuse"
reclassField = "LANDUSE"
remap = RemapValue([["Brush/transitional", 0], ["Water", 1],["Barren land", 2]])

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Execute Reclassify
outReclassify = Reclassify(inRaster, reclassField, remap, "NODATA")

# Save the output 
outReclassify.save("C:/sapyexamples/output/outreclass02")

Environments

  • Auto Commit
  • Cell Size
  • Cell Size Projection Method
  • Compression
  • Current Workspace
  • Extent
  • Geographic Transformations
  • Mask
  • Output CONFIG Keyword
  • Output Coordinate System
  • Parallel Processing Factor
  • Scratch Workspace
  • Snap Raster
  • Tile Size

Licensing information

  • Basic: Requires Spatial Analyst or 3D Analyst
  • Standard: Requires Spatial Analyst or 3D Analyst
  • Advanced: Requires Spatial Analyst or 3D Analyst

Related topics

  • An overview of the Reclass toolset
  • Understanding reclassification
  • How Reclass By ASCII File works
  • Reclass by ranges of values
  • Reclass by individual values

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal