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

PropiedadExplicaciónTipo de datos
height
(Sólo lectura)

The number of rows.

Integer
isInteger
(Sólo lectura)

Indicates whether the raster band has integer type.

Boolean
meanCellHeight
(Sólo lectura)

The cell size in y direction.

Double
meanCellWidth
(Sólo lectura)

The cell size in x direction.

Double
noDataValue
(Sólo lectura)

The NoData value of the raster band.

String
pixelType
(Sólo lectura)

The pixel type.

  • U11 bit
  • U22 bits
  • U44 bits
  • U8Unsigned 8-bit integers
  • S88-bit integers
  • U16Unsigned 16-bit integers
  • S1616-bit integers
  • U32Unsigned 32-bit integers
  • S3232-bit integers
  • F32Single-precision floating point
  • F64Double-precision floating point
String
primaryField
(Sólo lectura)

The index of the field.

Integer
tableType
(Sólo lectura)

The class names of the table.

  • ValueValues in the table are used for values only, not for indexing.
  • IndexValues in the table are used as indexes in the raster table.
  • InvalidValues are invalid.
String
width
(Sólo 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)