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.
Syntax
GetRasterProperties(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 |
Derived Output
Name | Explanation | Data Type |
property | Returns the property value that was specified. | Variant |
Code sample
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)
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