ArcGIS Enterprise SDK
IRemapFilter Interface
ArcGIS Enterprise SDK Developer Help > ArcGIS Enterprise SDK API Reference > ArcGIS Enterprise SDK .NET Namespaces > ESRI.ArcGIS.DataSourcesRaster > Interfaces > IR > IRemapFilter Interface
ArcGIS Developer Help

IRemapFilter Interface

Provides access to members that control a remap filter.

Members

Name Description
Method AddClass Adds a remap class that remaps values in [minvalue,maxvalue) to a give new value.
Method AddNoDataClass Adds a remap class that remaps values in [minvalue,maxvalue) to NoData.
Read/write property AllowUnmatched Indicates if unmatched values should be passed through.
Read-only property ClassCount The number of remapped classes.
Method Empty Removes all classes.
Method PutClass Puts a remap class at a given class index (starting from 0).
Method QueryClass Queries a remap class at a given class index (starting from 0).

Classes that implement IRemapFilter

Classes Description
RemapFilter A class for remap filter.

Remarks

Provides access to the members of IRemapFilter. Similar to the reclass concept, this filters group raster pixel values into classes and creates a raster with those classes. Another benefit of this filter is that you can specify a range of values to be nodata and add it to nodataclass.

Sub remap(pRaster As iRaster, pOutWs As IWorkspace)
    Dim pFilter As IRemapFilter
    Set pFilter = New RemapFilter

    'add classes
    pFilter.AddClass 5, 20, 0
    pFilter.AddClass 20, 50, 1
    pFilter.AddClass 50, 100, 2
    pFilter.AddClass 100, 120, 3
    pFilter.AddClass 120, 150, 4
    pFilter.AddClass 150, 256, 5
   
    'add nodatdclass, all values between 0 and 5 (>= 0 and <5) will turn to nodata in the output
    pFilter.AddNoDataClass 0, 5

    Dim pSaveAs As ISaveAs
    Set pSaveAs = pRaster
   
    'set filter
    Dim pFilterOp As IPixelOperation
    Set pFilterOp = pRaster
    Set pFilterOp.PixelFilter = pFilter
   
    'save out
    pSaveAs.saveas "Remap3.img", pOutWs, "IMAGINE Image"
End Sub