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.

  • MINIMUM —Returns the smallest value of all cells in the input raster.
  • MAXIMUM —Returns the largest value of all cells in the input raster.
  • MEAN —Returns the average of all cells in the input raster.
  • STD —Returns the standard deviation of all cells in the input raster.
  • UNIQUEVALUECOUNT —Returns the number of unique values in the input raster.
  • TOP —Returns the top or YMax value of the extent.
  • LEFT —Returns the left or XMin value of the extent.
  • RIGHT —Returns the right or XMax value of the extent.
  • BOTTOM —Returns the bottom or YMin value of the extent.
  • CELLSIZEX —Returns the cell size in the x-direction.
  • CELLSIZEY —Returns the cell size in the y-direction.
  • VALUETYPE —Returns 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 = 64-bit complex
    • 13 = 16-bit complex
    • 14 = 32-bit complex
  • COLUMNCOUNT —Returns the number of columns in the input raster.
  • ROWCOUNT —Returns the number of rows in the input raster.
  • BANDCOUNT —Returns the number of bands in the input raster.
  • ANYNODATA —Returns whether there is NoData in the raster.
  • ALLNODATA —Returns whether all the pixels are NoData. This is the same as ISNULL.
  • SENSORNAME —Returns the name of the sensor.
  • PRODUCTNAME —Returns the product name related to the sensor.
  • AQUISITIONDATE —Returns the date that the data was captured.
  • SOURCETYPE —Returns the source type.
  • CLOUDCOVER —Returns the amount of cloud cover as a percentage.
  • SUNAZIMUTH —Returns the sun azimuth, in degrees.
  • SUNELEVATION —Returns the sun elevation, in degrees.
  • SENSORAZIMUTH —Returns the sensor azimuth, in degrees.
  • SENSORELEVATION —Returns the sensor elevation, in degrees.
  • OFFNADIR —Returns the off-nadir angle, in degrees.
  • WAVELENGTH —Returns 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
11/18/2013