删除栅格属性表 (Data Management)

许可等级:BasicStandardAdvanced

摘要

移除与栅格数据集关联的栅格属性表。由于只能在单波段栅格数据集中构建栅格属性表,因此该工具仅适用于具有单波段的栅格数据集。

用法

语法

DeleteRasterAttributeTable_management (in_raster)
参数说明数据类型
in_raster

包含要移除的栅格属性表的栅格数据集。栅格数据集必须是单波段栅格数据集。

Raster Layer

代码实例

DeleteRasterAttributeTable 示例(Python 窗口)

这是 DeleteRasterAttributeTable 工具的 Python 示例。

import arcpy
arcpy.DeleteRasterAttributeTable_management("c:/data/delrat.tif")
DeleteRasterAttributeTable 示例 2(独立脚本)

这是 DeleteRasterAttributeTable 工具的 Python 脚本示例。

##====================================
##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()

环境

相关主题

许可信息

ArcGIS for Desktop Basic: 是
ArcGIS for Desktop Standard: 是
ArcGIS for Desktop Advanced: 是
5/10/2014