ReclassByRemap

Reclassifies or changes the value of the input cells using a remap table.


Usage tips

ArcObjects

Syntax

See Reclass by Table

Map Algebra syntax

See Reclass


ArcObjects syntax

IReclassOp::ReclassByRemap (geoDataset As IGeoDataset, remap As IRemap, retainMissingValues As Boolean) As IGeoDataset

Parameter Explanation
geoDataset An input Raster, RasterDataset, RasterBand, or RasterDescriptor. The values contained in this raster will be the values to be reclassified.
remap An input object that supports the IRemap interface. If reclassifying numbers, use the NumberRemap object. If reclassifying string values, use the StringRemap object.
retainMissingValues Defines the manner in which values not present in the remap will be handled. If True, and if any cell location on the input raster contains a value that is not present or reclassed in the remap table, the value should remain intact and be written for that location to the output raster. If False, and if any cell location on the input raster contains a value that is not present or reclassed in the remap table, the value will be reclassed to NoData for that location on the output raster.

ArcObjects example

'Reclassifies (or changes) the values of the input cells of a raster by
'  using a remap that is built programmatically.
'
'Function ReclassByRemap(ByVal GeoDataset As esriGeoDatabase.IGeoDataset, _
'  ByVal Remap As IRemap, ByVal retainMissingValues As Boolean) _
'  As esriGeoDatabase.IGeoDataset
'
'Member of esriGeoAnalyst.IReclassOp

Dim pReclassOp As IReclassOp
Set pReclassOp = New RasterReclassOp

' Get raster dataset
Dim pRas01 As IRaster
Set pRas01 = readRasterFromDisk("c:\data\myRaster")

' Set the Remap
Dim pRemap As IRemap
Dim pSRemap As INumberRemap
Set pSRemap = New NumberRemap

pSRemap.MapRange -3, 0, 0
pSRemap.MapRange 0, 2, 20
pSRemap.MapRange 2, 3, 60
Set pRemap = pSRemap

' Create output raster dataset
Dim pRasOut As IRaster
Set pRasOut = pReclassOp.ReclassByRemap(pRas01, pRemap, True)

See Also

  • Reclass
  • Reclassify
  • Reclass by Table
  • Using the ArcGIS Spatial Analyst toolbar to reclassify data
  • An overview of the Reclass tools