Label | Explanation | Data Type |

Input raster | The input surface raster. | Raster Layer |

Output raster | The output slope raster. It will be floating-point type. | Raster Dataset |

Output measurement (Optional) | Determines the measurement units (degrees or percentages) of the output slope raster. - Degree—The inclination of slope will be calculated in degrees.
- Percent rise—The inclination of slope will be calculated as percent rise, also referred to as the percent slope.
| String |

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

Method (Optional) | Specifies whether the calculation will be based on a planar (flat earth) or a geodesic (ellipsoid) method. The planar method is appropriate to use on local areas in a projection that maintains correct distance and area. It is suitable for analyses that cover areas such cities, counties, or smaller states in area. The geodesic method produces a more accurate result, at the potential cost of an increase in processing time. - Planar—The calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default method.
- Geodesic—The calculation will be performed in a 3D Cartesian coordinate system by considering the shape of the earth as an ellipsoid.
| String |

Z unit (Optional) | The linear unit of vertical z-values. It is defined by a vertical coordinate system if it exists. If a vertical coordinate system does not exist, the z-unit should be defined from the unit list to ensure correct geodesic computation. The default is meter. - Inch—The linear unit will be inches.
- Foot—The linear unit will be feet.
- Yard—The linear unit will be yards.
- Mile US—The linear unit will be miles.
- Nautical mile—The linear unit will be nautical miles.
- Millimeter—The linear unit will be millimeters.
- Centimeter—The linear unit will be centimeters.
- Meter—The linear unit will be meters.
- Kilometer—The linear unit will be kilometers.
- Decimeter—The linear unit will be decimeters.
| String |

Available with Spatial Analyst license.

Available with 3D Analyst license.

## Summary

Identifies the slope (gradient or steepness) from each cell of a raster.

The Surface Parameters tool provides a newer implementation and enhanced functionality.

## Illustration

## Usage

The Surface Parameters tool provides a newer implementation of slope and is recommended to be used instead of the Slope tool. The Slope tool fits a plane to the nine local cells, but a plane may not be a good descriptor of the landscape and may mask or exaggerate natural variations of interest. The Surface Parameters tool fits a surface to the neighborhood of cells instead of a plane, which provides a more natural fit to the terrain.

The Slope tool uses a 3 by 3 window of cells to compute the value, while the Surface Parameters tool allows window sizes from 3 by 3 to 15 by 15 cells. Larger window sizes are useful with high resolution elevation data to capture land surface processes at an appropriate scale. Surface Parameters also provides an adaptive window option that evaluates the local variability of the terrain and identifies the largest appropriate neighborhood size for each cell. This can be useful with gradual homogeneous terrain interrupted by streams, roads, or sharp breaks in slope.

You can continue to use the traditional approach of the Slope tool if you need your results to exactly match previous tool runs or if fast execution time is more important than a better algorithm.

This tool uses a 3 by 3 cell moving window to process the data. If the processing cell is NoData, the output for that location will be NoData.

Of the eight cells neighboring the processing cell, this tool requires that at least seven of them have a valid value. If there are fewer than seven valid cells, the calculation will not be performed, and the output at that processing cell will be NoData.

The cells in the outermost rows and columns of the output raster will be NoData. This is because along the boundary of the input dataset, those cells do not have enough valid neighbors.

The range of values in the output depends on the type of measurement units.

- For degrees, the range of slope values is 0 to 90.
- For percent rise, the range is 0 to essentially 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.

For the planar method, the use of a z-factor is essential for correct slope calculations when the surface (vertical) z-units are expressed in units different from the ground x,y units. The Z factor parameter will be enabled only when the planar method is selected.

For the geodesic method, specifying the surface z-unit is important to ensure the accuracy of the output. The Z unit parameter will be enabled only when the geodesic method is selected.

If a z-unit is available in the vertical coordinate system of the input raster, it will be applied automatically. It is recommended that you define a z-unit for the input raster if it is missing. You can use the Define Projection tool to specify a z-unit. If it is undefined, meter will be used by default.

When the input raster needs to be resampled, the bilinear technique will be used. An example of when an input raster may be resampled is when the output coordinate system, extent, or cell size is different from that of the input.

If the Input raster parameter value (in_raster in Python) is high resolution with a cell size of less than a few meters, or particularly noisy, consider using the Surface Parameters tool and its user-defined neighborhood distance option instead of the immediate 3 by 3 neighborhood of this tool. Using a larger neighborhood can minimize the effect of noisy surfaces. Using a larger neighborhood can also better represent landforms and surface characteristics when using high resolution surfaces.

This tool can be GPU accelerated when calculating geodesic slope, which means that if a GPU device (graphics processing unit) is available on your system, it will be used to enhance the performance of the geodesic method.

More information on how to configure your GPU device is available in the Spatial Analyst extension help in the GPU processing with Spatial Analyst help topic.

## Parameters

arcpy.ddd.Slope(in_raster, out_raster, {output_measurement}, {z_factor}, {method}, {z_unit})

Name | Explanation | Data Type |

in_raster | The input surface raster. | Raster Layer |

out_raster | The output slope raster. It will be floating-point type. | Raster Dataset |

output_measurement (Optional) | Determines the measurement units (degrees or percentages) of the output slope raster. - DEGREE—The inclination of slope will be calculated in degrees.
- PERCENT_RISE—The inclination of slope will be calculated as percent rise, also referred to as the percent slope.
| String |

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

method (Optional) | Specifies whether the calculation will be based on a planar (flat earth) or a geodesic (ellipsoid) method. - PLANAR—The calculation will be performed on a projected flat plane using a 2D Cartesian coordinate system. This is the default method.
- GEODESIC—The calculation will be performed in a 3D Cartesian coordinate system by considering the shape of the earth as an ellipsoid.
The planar method is appropriate to use on local areas in a projection that maintains correct distance and area. It is suitable for analyses that cover areas such cities, counties, or smaller states in area. The geodesic method produces a more accurate result, at the potential cost of an increase in processing time. | String |

z_unit (Optional) | The linear unit of vertical z-values. It is defined by a vertical coordinate system if it exists. If a vertical coordinate system does not exist, the z-unit should be defined from the unit list to ensure correct geodesic computation. The default is meter. - INCH—The linear unit will be inches.
- FOOT—The linear unit will be feet.
- YARD—The linear unit will be yards.
- MILE_US—The linear unit will be miles.
- NAUTICAL_MILE—The linear unit will be nautical miles.
- MILLIMETER—The linear unit will be millimeters.
- CENTIMETER—The linear unit will be centimeters.
- METER—The linear unit will be meters.
- KILOMETER—The linear unit will be kilometers.
- DECIMETER—The linear unit will be decimeters.
| String |

### Code sample

This example determines the slope values of the input surface raster.

```
import arcpy
from arcpy import env
env.workspace = "C:/data"
arcpy.Slope_3d("elevation", "C:/output/outslope01", "DEGREE", 0.3043)
```

This example determines the slope values of the input surface raster.

```
# Name: Slope_3d_Ex_02.py
# Description: Identifies the rate of maximum change
# in z-value from each cell.
# Requirements: 3D Analyst Extension
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inRaster = "elevation"
outRaster = "C:/output/outslope02"
outMeasurement = "DEGREE"
zFactor = ""
method = "GEODESIC"
zUnit = "FOOT"
# Check out the ArcGIS 3D Analyst extension license
arcpy.CheckOutExtension("3D")
# Execute Slope
arcpy.Slope_3d(inRaster, outRaster, outMeasurement, zFactor, method, zUnit)
```

## Environments

## Licensing information

- Basic: Requires 3D Analyst or Spatial Analyst
- Standard: Requires 3D Analyst or Spatial Analyst
- Advanced: Requires 3D Analyst or Spatial Analyst