Skip to main content

Raster Band properties

Resumen

The Describe function returns the following properties for raster bands. The Table and Dataset property groups are also supported.

For a raster band, the Describe dataType property returns a value of "RasterBand".

Propiedades

Propiedad Explicación Tipo de datos

height

(Solo lectura)

The number of rows.

Integer

isInteger

(Solo lectura)

Indicates whether the raster band has integer type.

Boolean

meanCellHeight

(Solo lectura)

The cell size in y direction.

Double

meanCellWidth

(Solo lectura)

The cell size in x direction.

Double

noDataValue

(Solo lectura)

The NoData value of the raster band.

String

pixelType

(Solo lectura)

The pixel type.

  • U1—1 bit

  • U2—2 bits

  • U4—4 bits

  • U8—Unsigned 8-bit integers

  • S8—8-bit integers

  • U16—Unsigned 16-bit integers

  • S16—16-bit integers

  • U32—Unsigned 32-bit integers

  • S32—32-bit integers

  • F32—Single-precision floating point

  • F64—Double-precision floating point

String

primaryField

(Solo lectura)

The index of the field.

Integer

tableType

(Solo lectura)

The class names of the table.

  • Value—Values in the table are used for values only, not for indexing.

  • Index—Values in the table are used as indexes in the raster table.

  • Invalid—Values are invalid.

String

width

(Solo lectura)

The number of columns.

Integer

Muestra de código

Raster band properties example

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)