Reclass by Table (Spatial Analyst)

Resumen

Reclassifies (or changes) the values of the input cells of a raster using a remap table.

Uso

Sintaxis

ReclassByTable (in_raster, in_remap_table, from_value_field, to_value_field, output_value_field, {missing_values})
ParámetroExplicaciónTipo de datos
in_raster

The input raster to be reclassified.

Raster Layer
in_remap_table

Table holding fields defining value ranges to be reclassified and the values they will become.

Table View
from_value_field

Field holding the beginning value for each value range to be reclassified.

This is a numeric field of the input remap table.

Field
to_value_field

Field holding the ending value for each value range to be reclassified.

This is a numeric field of the input remap table.

Field
output_value_field

Field holding the integer values to which each range should be changed.

This is an integer field of the input remap table.

Field
missing_values
(Opcional)

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 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 not present or reclassed in a remap table, the value will be reclassed to NoData for that location on the output raster.
Boolean

Valor de retorno

NombreExplicaciónTipo de datos
out_raster

The output reclassified raster.

The output will always be of integer type.

Raster

Ejemplo de código

ReclassByTable example 1 (Python window)

This example uses a remap table to reclassify the input raster.

import arcpy
from arcpy.sa import *
from arcpy import env  
env.workspace = "C:/sapyexamples/data"
outReclass = ReclassByTable("slope","remapslope","FROM","TO","OUT")
outReclass.save("C:/sapyexamples/output/recslope")
ReclassByTable example 2 (stand-alone script)

This example uses a remap table to reclassify the input raster.

# Name: reclassbytable_example02.py
# Description: Reclassifies the values of the input raster using a remap table.
# 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 = "slope"
inRemapTable = "remapslope"

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

# Execute Reclassify
outRaster = ReclassByTable(inRaster, inRemapTable,"FROM","TO","OUT","NODATA")

# Save the output 
outRaster.save("C:/sapyexamples/output/recslope")

Entornos

Temas relacionados

Información de licencia

ArcView: Requiere Spatial Analyst o 3D Analyst
ArcEditor: Requiere Spatial Analyst o 3D Analyst
ArcInfo: Requiere Spatial Analyst o 3D Analyst

7/11/2012