Summary
Retrieves information from the metadata and descriptive statistics about a raster dataset.
Usage
- The property returned is displayed in the Results window. 
- 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. 
Syntax
GetRasterProperties_management (in_raster, {property_type}, {band_index})| Parameter | Explanation | Data Type | 
| in_raster | The raster containing the properties to retrieve. | Composite Geodataset | 
| property_type (Optional) | The property to be obtained from the input raster. 
 | 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 | 
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
Licensing information
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes