Delete Raster Attribute Table (Data Management)

Summary

Removes the raster attribute table associated with a raster dataset.

Usage

  • The input raster dataset can only have a single band.

Parameters

LabelExplanationData Type
Input Raster

The raster dataset containing the attribute table you want to remove.

Raster Layer

Derived Output

LabelExplanationData Type
Updated Input Raster

The output raster dataset.

Raster Layer

arcpy.management.DeleteRasterAttributeTable(in_raster)
NameExplanationData Type
in_raster

The raster dataset containing the attribute table you want to remove.

Raster Layer

Derived Output

NameExplanationData Type
out_raster

The output raster dataset.

Raster Layer

Code sample

DeleteRasterAttributeTable example 1 (Python window)

This is a Python sample for the DeleteRasterAttributeTable tool.

##====================================
##Delete Raster Attribute Table
##Usage: DeleteRasterAttributeTable_management in_raster
    
import arcpy
arcpy.env.workspace = "C:/Workspace"

##Delete the attribute table of single band image if exist
arcpy.DeleteRasterAttributeTable_management("image.tif")
DeleteRasterAttributeTable example 2 (stand-alone script)

This is a Python script sample for the DeleteRasterAttributeTable tool.

##====================================
##Delete Raster Attribute Table
##Usage: DeleteRasterAttributeTable_management in_raster
    
import arcpy
arcpy.env.workspace = "C:/Workspace"

##Delete the attribute table of single band image if exist
arcpy.DeleteRasterAttributeTable_management("image.tif")

Environments

This tool does not use any geoprocessing environments.

Related topics