Get Raster Properties (Data Management)
Summary
Returns the properties of a raster dataset, mosaic dataset, or a raster product.
Usage
-
The property returned will be displayed in the Results window.
The Python result of this tool returns 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 input raster dataset or mosaic dataset. | Composite Geodataset |
property_type (Optional) |
The property to be obtained from the raster dataset or mosaic dataset.
| 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