栅格数据集属性

摘要

Describe 函数将返回栅格数据集的以下属性。还支持数据集属性

栅格数据集将返回 "RasterDataset"dataType

属性

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

The number of bands in the raster dataset

Integer
compressionType
(只读)

The compression type

  • LZ77
  • JPEG
  • JPEG2000
  • None
String
format
(只读)

The raster format

  • Grid
  • ERDAS IMAGINE
  • TIFF
String
permanent
(只读)

Indicates the permanent state of the raster. False if the raster is temporary, True if the raster is permanent

Boolean
sensorType
(只读)

The sensor type used to capture the image

String

代码示例

Raster Dataset properties example (stand-alone script)

The following stand-alone script displays some properties for a raster dataset.

import arcpy

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

# Print some raster dataset properties
# 
print "Band Count:       %d" % desc.bandCount
print "Compression Type: %s" % desc.compressionType
print "Raster Format:    %s" % desc.format


7/10/2012