栅格波段属性

摘要

Describe 函数可返回栅格波段的以下属性。还支持表属性数据集属性

栅格波段将返回 “RasterBand”dataType

属性

属性说明数据类型
height
(只读)

行数

Integer
isInteger
(只读)

表明栅格波段是否具有整型

Boolean
meanCellHeight
(只读)

y 方向上的像元大小

Double
meanCellWidth
(只读)

x 方向上的像元大小

Double
noDataValue
(只读)

栅格波段的 NoData 值

String
pixelType
(只读)

像素类型

  • U11 位
  • U22 位
  • U44 位
  • U88 位无符号整型
  • S88 位整型
  • U1616 位无符号整型
  • S1616 位整型
  • U3232 位无符号整型
  • S3232 位整型
  • F32单精度浮点型
  • F64双精度浮点型
String
primaryField
(只读)

字段索引

Integer
tableType
(只读)

表的类名称

  • Value表中的值仅用作值,而不用于索引。
  • Index表中的值用作栅格表中的索引。
  • Invalid值无效。
String
width
(只读)

列数

Integer

代码示例

栅格波段属性示例(独立脚本)

以下独立脚本显示栅格波段的一些属性。

import arcpy

# Create a Describe object from the raster band
#
desc = arcpy.Describe("C:/data/preston.img/Band_1")

# Print some raster band properties
#
print("Height: %d" % desc.height)
print("Width:  %d" % desc.width)
print("Integer Raster: %s" % desc.isInteger)

在本主题中