Get Raster Properties (Data Management)

License Level:BasicStandardAdvanced

Summary

Returns the properties of a raster dataset, mosaic dataset, or a raster product.

Usage

Syntax

GetRasterProperties_management (in_raster, {property_type}, {band_index})
ParameterExplanationData Type
in_raster

The input raster dataset or mosaic dataset.

Composite Geodataset
property_type
(Optional)

The property to be obtained from the raster dataset or mosaic dataset.

  • MINIMUMReturns the smallest value of all cells in the input raster.
  • MAXIMUMReturns the largest value of all cells in the input raster.
  • MEANReturns the average of all cells in the input raster.
  • STDReturns the standard deviation of all cells in the input raster.
  • UNIQUEVALUECOUNTReturns the number of unique values in the input raster.
  • TOPReturns the top or YMax value of the extent.
  • LEFTReturns the left or XMin value of the extent.
  • RIGHTReturns the right or XMax value of the extent.
  • BOTTOMReturns the bottom or YMin value of the extent.
  • CELLSIZEXReturns the cell size in the x-direction.
  • CELLSIZEYReturns the cell size in the y-direction.
  • VALUETYPEReturns the type 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
  • COLUMNCOUNTReturns the number of columns in the input raster.
  • ROWCOUNTReturns the number of rows in the input raster.
  • BANDCOUNTReturns the number 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.
  • SENSORNAMEReturns the name of the sensor.
  • PRODUCTNAMEReturns the product name related to the sensor.
  • AQUISITIONDATEReturns the date that the data was captured.
  • SOURCETYPEReturns the source type.
  • CLOUDCOVERReturns the amount of cloud cover as a percentage.
  • SUNAZIMUTHReturns the sun azimuth, in degrees.
  • SUNELEVATIONReturns the sun elevation, in degrees.
  • SENSORAZIMUTHReturns the sensor azimuth, in degrees.
  • SENSORELEVATIONReturns the sensor elevation, in degrees.
  • OFFNADIRReturns the off-nadir angle, in degrees.
  • WAVELENGTHReturns the wavelength range of the band, in nanometers.
String
band_index
(Optional)

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

String

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

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015