ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Get Raster Properties

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

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})
ParameterExplanationData Type
in_raster

The raster containing the properties to retrieve.

Composite Geodataset
property_type
(Optional)

The property to be obtained from the input raster.

  • MINIMUM —Smallest value of all cells in the input raster.
  • MAXIMUM —Largest value of all cells in the input raster.
  • MEAN —Average of all cells in the input raster.
  • STD —Standard deviation of all cells in the input raster.
  • UNIQUEVALUECOUNT —Number of unique values in the input raster.
  • TOP —Top or YMax value of the extent.
  • LEFT —Left or XMin value of the extent.
  • RIGHT —Right or XMax value of the extent.
  • BOTTOM —Bottom or YMin value of the extent.
  • CELLSIZEX —Cell size in the x-direction.
  • CELLSIZEY —Cell size in the y-direction.
  • VALUETYPE —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
  • COLUMNCOUNT —Number of columns in the input raster.
  • ROWCOUNT —Number of rows in the input raster.
  • BANDCOUNT —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 —Name of the sensor.
  • PRODUCTNAME —Product name related to the sensor.
  • ACQUISITIONDATE —Date that the data was captured.
  • SOURCETYPE —Source type.
  • CLOUDCOVER —Amount of cloud cover as a percentage.
  • SUNAZIMUTH —Sun azimuth, in degrees.
  • SUNELEVATION —Sun elevation, in degrees.
  • SENSORAZIMUTH —Sensor azimuth, in degrees.
  • SENSORELEVATION —Sensor elevation, in degrees.
  • OFFNADIR —Off-nadir angle, in degrees.
  • WAVELENGTH —Wavelength range of the band, in nanometers.
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

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Raster toolset
  • Environment settings for raster data

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal