Raster Dataset properties

Summary

The Describe function returns the following properties for Raster Datasets. Dataset Properties are also supported.

A Raster Dataset returns a dataType of "RasterDataset".

Properties

PropertyExplanationData Type
bandCount
(Read Only)

The number of bands in the raster dataset

Integer
compressionType
(Read Only)

The compression type

  • LZ77
  • JPEG
  • JPEG2000
  • None
String
format
(Read Only)

The raster format

  • GRID
  • ERDAS IMAGINE
  • TIFF
String
permanent
(Read Only)

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

Boolean
sensorType
(Read Only)

The sensor type used to capture the image

String

Code Sample

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


10/28/2011