Delete Raster Attribute Table (Data Management)

License Level:BasicStandardAdvanced

Summary

Removes the raster attribute table associated with a raster dataset. Since raster attribute tables can only be built on single-band raster datasets, this tool is only valid for raster datasets with a single band.

Usage

Syntax

DeleteRasterAttributeTable_management (in_raster)
ParameterExplanationData Type
in_raster

The raster dataset containing the raster attribute table to be removed. The raster dataset must be a single-band raster dataset.

Raster Layer

Code Sample

DeleteRasterAttributeTable Example (Python Window)

This is a Python sample for the DeleteRasterAttributeTable tool.

import arcpy
arcpy.DeleteRasterAttributeTable_management("c:/data/delrat.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
    
try:
    import arcpy
    arcpy.env.workspace = r"C:/Workspace"
    
    ##Delete the attribute table of single band image if exist
    arcpy.DeleteRasterAttributeTable_management("image.tif")

except:
    print "Delete Raster Attribute Table example failed."
    print arcpy.GetMessages()

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013