Reclassify (3D Analyst)

Summary

Reclassifies (or changes) the values in a raster.

Usage

Syntax

Reclassify_3d (in_raster, reclass_field, remap, out_raster, {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

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.

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

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

Related Topics

Licensing Information

ArcView: Requires 3D Analyst or Spatial Analyst
ArcEditor: Requires 3D Analyst or Spatial Analyst
ArcInfo: Requires 3D Analyst or Spatial Analyst

6/10/2013