Summary
The Describe function returns the following properties for Raster Bands. Table Properties and Dataset Properties are also supported.
A Raster Band returns a dataType of "RasterBand".
Properties
Property | Explanation | Data Type |
height (Read Only) | The number of rows | Integer |
isInteger (Read Only) | Indicates whether the raster band has integer type | Boolean |
meanCellHeight (Read Only) | The cell size in y direction | Double |
meanCellWidth (Read Only) | The cell size in x direction | Double |
noDataValue (Read Only) | The NoData value of the raster band | String |
pixelType (Read Only) | The pixel type
| String |
primaryField (Read Only) | The index of the field | Integer |
tableType (Read Only) | The class names of the table
| String |
width (Read Only) | The number of columns | Integer |
Code sample
The following stand-alone script displays some properties for a raster band.
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