Synthèse
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".
Propriétés
Propriété | Explication | Type de données |
height (Lecture seule) | The number of rows. | Integer |
isInteger (Lecture seule) | Indicates whether the raster band has integer type. | Boolean |
meanCellHeight (Lecture seule) | The cell size in y direction. | Double |
meanCellWidth (Lecture seule) | The cell size in x direction. | Double |
noDataValue (Lecture seule) | The NoData value of the raster band. | String |
pixelType (Lecture seule) | The pixel type.
| String |
primaryField (Lecture seule) | The index of the field. | Integer |
tableType (Lecture seule) | The class names of the table.
| String |
width (Lecture seule) | The number of columns. | Integer |
Exemple de code
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)
Vous avez un commentaire à formuler concernant cette rubrique ?