Identifies the rate of maximum change in zvalue from each cell.
Learn more about how Slope works
Identifies the rate of maximum change in zvalue from each cell.
Learn more about how Slope works
Command line and Scripting
Slope is the rate of maximum change in zvalue from each cell.
The use of a z factor is essential for correct slope calculations when the surface z units are expressed in units different from the ground x,y units.
The range of slope values in degrees is 0 to 90. For percent rise, the range is 0 for near infinity. A flat surface is 0 percent, a 45 degree surface is 100 percent, and as the surface becomes more vertical, the percent rise becomes increasingly larger.
If the center cell in the immediate neighborhood (3 x 3 window) is NoData, the output is NoData.
If any neighborhood cells are NoData, they are assigned the value of the center cell; then the slope is computed.
The following environment settings affect this tool:
Map Algebra
The surface information for calculating the slope can be expressed as raster.item for any numeric item in the value attribute table. The default item is Value.
The use of a z factor is essential for correct slope calculations when the surface z units are expressed in units which are different from the ground x,y units.
The range of slope values in degrees is 0 to 90. For percent rise, the range is 0 for near infinity. A flat surface is 0 percent, a 45 degree surface is 100 percent, and as the surface becomes more vertical, the percent rise becomes increasingly larger.
If the center cell in the immediate neighborhood (3 x 3 window) is NoData, the output is NoData.
If any neighborhood cells are NoData, they are assigned the value of the center cell; then the slope is computed.
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
ArcObjects
Valid input for the geoDataset to ArcObjects is a Raster, RasterDataset, RasterBand, or RasterDescriptor.
The use of a z factor is essential for correct slope calculations when the surface z units are expressed in units different from the ground x,y units.
The range of values with the Degree option of slopeType is 0 to 90. The range of the PercentRise option is 0 to near infinity. A flat surface is 0 percent, a 45 degree surface is 100 percent, and as the surface becomes more vertical, the percent rise becomes increasingly larger.
If the center cell in the immediate neighborhood (3 x 3 window) is NoData, the output is NoData.
If any neighborhood cells are NoData, they are assigned the value of the center cell; then the slope is computed.
The output from the ArcObjects method is a raster object.
Parameter  Explanation  Datatype 

Input raster (Required) 
Input raster.

Composite Geodataset 
Output raster (Required) 
The raster to be created.

Raster Dataset 
Output measurement (Optional) 
Determines the measurement units (degrees or percentages) of the output slope data.

String 
Z factor (Optional) 
The number of ground x,y units in one surface z unit. The zfactor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The zvalues of the input surface are multiplied by the zfactor when calculating the final output surface. If the x,y units and z units are in the same units of measure, the zfactor is 1. This is the default. If the x,y units and z units are in different units of measure, the zfactor must be set to the appropriate factor, or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a zfactor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meter).

Double 
# Slope_sample.py # Description: # Derives slope from a raster surface. # Requirements: None # Author: ESRI # Date: Sept 6, 2005 # Import system modules import arcgisscripting # Create the Geoprocessor object gp = arcgisscripting.create() try: # Set local variables InRaster = "C:/data/dem" OutRaster = "C:/data/slope" InMeasurementType = "PERCENT_RISE" # Check out ArcGIS Spatial Analyst extension license gp.CheckOutExtension("Spatial") # Process: Slope gp.Slope_sa(InRaster, OutRaster, InMeasurementType) except: # If an error occurred while running a tool, then print the messages. print gp.GetMessages()
Slope(<grid>, <z_factor>, {DEGREE  PERCENTRISE})
Parameter  Explanation 

<grid>  Any valid combination of rasters, numbers, operators, and functions that produces an output raster. 
{DEGREE  PERCENTRISE}  Keywords specifying the units in which the value of slope will be expressed.

<z_factor>  The number of ground x,y units in one surface z unit. The zfactor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The zvalues of the input surface are multiplied by the zfactor when calculating the final output surface. If the x,y units and z units are in the same units of measure, the zfactor is 1. This is the default. If the x,y units and z units are in different units of measure, the zfactor must be set to the appropriate factor or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a zfactor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meters). 
slope(ingrid) slope(ingrid, percentrise) slope(ingrid, .328) slope(ingrid, 2, degree)
Parameter  Explanation 

geoDataset  An input Raster, RasterDataset, RasterBand, or RasterDescriptor. 
slopeType 

zFactor  The number of ground x,y units in one surface z unit. The zfactor adjusts the units of measure for the z units when they are different from the x,y units of the input surface. The zvalues of the input surface are multiplied by the zfactor when calculating the final output surface. If the x,y units and z units are in the same units of measure, the zfactor is 1. This is the default. If the x,y units and z units are in different units of measure, the zfactor must be set to the appropriate factor or the results will be incorrect. For example, if your z units are feet and your x,y units are meters, you would use a zfactor of 0.3048 to convert your z units from feet to meters (1 foot = 0.3048 meters). 
' Create the RasterSurfaceOp object Dim pSurfaceOp As ISurfaceOp Set pSurfaceOp = New RasterSurfaceOp ' Declare the input raster object Dim pInputDataset As IGeoDataset ' Calls function to open a raster dataset from disk Set pInputDataset = OpenRasterDataset ("D:\SpatialData", "inputdataset") ' Declare the output raster object Dim pOutputRaster As IGeoDataset ' Calls the method Set pOutputRaster = pSurfaceOp.Slope (pInputDataset, esriGeoAnalysisSlopeDegrees)