Get Raster Properties (Data Management)

Summary

Retrieves information from the metadata and descriptive statistics about a raster dataset.

Usage

  • The property value returned is displayed in the Geoprocessing history item created by running the tool.

  • The Python result of this tool is a geoprocessing Result object. In order to obtain the string value, use the Result object's getOutput method.

Parameters

LabelExplanationData Type
Input Raster

The raster containing the properties to retrieve.

Composite Geodataset
Property type
(Optional)

The property to be obtained from the input raster.

  • Minimum cell valueSmallest value of all cells in the input raster.
  • Maximum cell valueLargest value of all cells in the input raster.
  • Mean of all cellsAverage of all cells in the input raster.
  • Standard Deviation of all cellsStandard deviation of all cells in the input raster.
  • Unique value countNumber of unique values in the input raster.
  • Maximum Y coordinate (top)Top (maximum y-coordinate) value of the extent.
  • Minimum X coordinate (left)Left (minimum x-coordinate) value of the extent.
  • Maximum X coordinate (right)Right (maximum x-coordinate) value of the extent.
  • Minimum Y coordinate (bottom)Bottom (minimum y-coordinate) value of the extent.
  • Cell size x-directionCell size in the x-direction.
  • Cell size y-directionCell size in the y-direction.
  • Cell value typeType of the cell value in the input raster.
  • Number of columnsNumber of columns in the input raster.
  • Number of rowsNumber of rows in the input raster.
  • Number of bandsNumber of bands in the input raster.
  • Contains NoData cellsReturns whether there is NoData in the raster.
  • All cells contain NoDataReturns whether all the pixels are NoData. This is also known as ISNULL.
  • Sensor nameName of the sensor.
  • Product nameProduct name related to the sensor.
  • Acquisition dateDate that the data was captured.
  • Source typeSource type.
  • Cloud coverAmount of cloud cover as a percentage.
  • Sun azimuthSun azimuth, in degrees.
  • Sun elevationSun elevation, in degrees.
  • Sensor azimuthSensor azimuth, in degrees.
  • Sensor elevationSensor elevation, in degrees.
  • Off nadirOff-nadir angle, in degrees.
  • WavelengthWavelength range of the band, in nanometers.
String
Band Name
(Optional)

Choose the band name from the drop-down box. If no band is chosen, then the first band will be used.

String

Derived Output

LabelExplanationData Type
Property

Returns the property value that was specified.

Variant

arcpy.management.GetRasterProperties(in_raster, {property_type}, {band_index})
NameExplanationData Type
in_raster

The raster containing the properties to retrieve.

Composite Geodataset
property_type
(Optional)

The property to be obtained from the input raster.

  • MINIMUMSmallest value of all cells in the input raster.
  • MAXIMUMLargest value of all cells in the input raster.
  • MEANAverage of all cells in the input raster.
  • STDStandard deviation of all cells in the input raster.
  • UNIQUEVALUECOUNTNumber of unique values in the input raster.
  • TOPTop or YMax value of the extent.
  • LEFTLeft or XMin value of the extent.
  • RIGHTRight or XMax value of the extent.
  • BOTTOMBottom or YMin value of the extent.
  • CELLSIZEXCell size in the x-direction.
  • CELLSIZEYCell size in the y-direction.
  • VALUETYPEType of the cell value in the input raster:
    • 0 = 1-bit
    • 1 = 2-bit
    • 2 = 4-bit
    • 3 = 8-bit unsigned integer
    • 4 = 8-bit signed integer
    • 5 = 16-bit unsigned integer
    • 6 = 16-bit signed integer
    • 7 = 32-bit unsigned integer
    • 8 = 32-bit signed integer
    • 9 = 32-bit floating point
    • 10 = 64-bit double precision
    • 11 = 8-bit complex
    • 12 = 16-bit complex
    • 13 = 32-bit complex
    • 14 = 64-bit complex
  • COLUMNCOUNTNumber of columns in the input raster.
  • ROWCOUNTNumber of rows in the input raster.
  • BANDCOUNTNumber of bands in the input raster.
  • ANYNODATAReturns whether there is NoData in the raster.
  • ALLNODATAReturns whether all the pixels are NoData. This is the same as ISNULL.
  • SENSORNAMEName of the sensor.
  • PRODUCTNAMEProduct name related to the sensor.
  • ACQUISITIONDATEDate that the data was captured.
  • SOURCETYPESource type.
  • CLOUDCOVERAmount of cloud cover as a percentage.
  • SUNAZIMUTHSun azimuth, in degrees.
  • SUNELEVATIONSun elevation, in degrees.
  • SENSORAZIMUTHSensor azimuth, in degrees.
  • SENSORELEVATIONSensor elevation, in degrees.
  • OFFNADIROff-nadir angle, in degrees.
  • WAVELENGTHWavelength range of the band, in nanometers.
String
band_index
(Optional)

Choose the band name from which to get the properties. If no band is chosen, then the first band will be used.

String

Derived Output

NameExplanationData Type
property

Returns the property value that was specified.

Variant

Code sample

GetRasterProperties example 1 (Python window)

This is a Python sample for GetRasterProperties.

import arcpy
#Get the geoprocessing result object
elevSTDResult = arcpy.GetRasterProperties_management("c:/data/elevation", "STD")
#Get the elevation standard deviation value from geoprocessing result object
elevSTD = elevSTDResult.getOutput(0)
GetRasterProperties example 2 (stand-alone script)

This is a Python script sample for GetRasterProperties.

import arcpy
#Get the geoprocessing result object
elevSTDResult = arcpy.GetRasterProperties_management("c:/data/elevation", "STD")
#Get the elevation standard deviation value from geoprocessing result object
elevSTD = elevSTDResult.getOutput(0)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics