ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS 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
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Surface Slope

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

Summary

Creates polygon features that represent ranges of slope values for triangulated surfaces.

Illustration

Surface Slope

Usage

  • The surface normal of each triangle, which is given by the vector cross-product of two triangle edges, is used to determine slope in percent or degrees. Percent slope describes the surface normal's ratio of change in height to change in horizontal distance, whereas degree slope is the angle of inclination between the surface normal and a horizontal plane.

  • Each resulting polygon represents a range of slope values based on the classification breaks used when executing the tool. The default classification breaks divide slope measurements into nine groups and are indicated below:

    SLOPE CODEPERCENT DEGREE RANGE

    1

    0.00 — 1.00

    0.00 — 0.57

    2

    1.00 — 2.15

    0.57 — 1.43

    3

    2.15 — 4.64

    1.43 — 2.66

    4

    4.64 — 10.0

    2.66 — 5.71

    5

    10.00 — 21.50

    5.71 — 12.13

    6

    21.50 — 46.40

    12.13 — 24.89

    7

    46.40 — 100.0

    24.89 — 45.00

    8

    100.0 — 1000.0

    45.00 — 84.29

    9

    1000.0 <

    84.29 — 90.0

  • Slope classifications may be customized by specifying a table with up to two fields of numeric values in the Class Breaks Table parameter. The first column identifies the break points of the slope classification. If a second column is provided, its values will be used to associate a code that gets attributed for each polygon feature. If the table below was used, all slope values from 0 to 10 will be represented by a code of 1, 10 to 25 by a code of 2, and so on. The class break units of the table are set in the Slope Units (units) parameter.

    CLASS_BREAKCODE

    10.0

    1

    25.0

    2

    40.0

    3

    70.0

    4

    The table can be in any supported format (.dbf, .txt, or geodatabase table). The name of the fields are irrelevant, as the first will always be used for the class breaks and the second for the aspect codes.

Syntax

arcpy.ddd.SurfaceSlope(in_surface, out_feature_class, {units}, {class_breaks_table}, {slope_field}, {z_factor}, {pyramid_level_resolution})
ParameterExplanationData Type
in_surface

The TIN, terrain, or LAS dataset whose slope measurements will be written to the output polygon feature.

LAS Dataset Layer; Terrain Layer; TIN Layer
out_feature_class

The feature class that will be produced by this tool.

Feature Class
units
(Optional)

The units of measure to be used in calculating slope.

  • PERCENT —Slope is expressed as a percentage value. This is the default.
  • DEGREE —Slope is expressed as the angle of inclination from a horizontal plane.
String
class_breaks_table
(Optional)

A table containing classification breaks that will be used to group the output features. The first column of this table will indicate the break point, whereas the second will provide the classification code.

Table
slope_field
(Optional)

The field containing slope values.

String
z_factor
(Optional)

The factor by which z-values will be multiplied. This is typically used to convert Z linear units to match XY linear units. The default is 1, which leaves elevation values unchanged. This parameter is disabled if the spatial reference of the input surface has a Z datum with a specified linear unit.

Double
pyramid_level_resolution
(Optional)

The z-tolerance or window-size resolution of the terrain pyramid level that will be used by this tool. The default is 0, or full resolution.

Double

Code sample

SurfaceSlope example 1 (Python window)

The following sample demonstrates the use of this tool in the Python window.

import arcpy
from arcpy import env

arcpy.CheckOutExtension("3D")
env.workspace = "C:/data"
arcpy.SurfaceSlope_3d("sample.gdb/featuredataset/terrain", "s_slope.shp", "PERCENT")
SurfaceSlope example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script.

'''****************************************************************************
Name: SurfaceSlope Example
Description: This script demonstrates how to use the 
             SurfaceAspect and SurfaceSlope tools to generate a polygon
             that contains the intersection of both 
****************************************************************************'''

# Import system modules
import arcpy
from arcpy import env

# Obtain a license for the ArcGIS 3D Analyst extension
arcpy.CheckOutExtension("3D")

# Set environment settings
env.workspace = "C:/data"

try:
    # List all TINs in workspace
    listTINs = arcpy.ListDatasets("","TIN")
    # Determine whether the list contains any TINs
    if len(listTINs) > 0:
        for dataset in listTINs:
            print dataset
            # Set Local Variables
            aspect = arcpy.CreateUniqueName("Aspect.shp")
            slope = arcpy.CreateUniqueName("Slope.shp")
            outFC = dataset + "_Aspect_Slope.shp"
            #Execute SurfaceAspect
            arcpy.SurfaceAspect_3d(dataset, aspect)
            #Execute SurfaceSlope
            arcpy.SurfaceSlope_3d(dataset, slope)
            #Execute SurfaceSlope
            print "Starting Intersect"
            arcpy.Intersect_analysis(aspect + " #;" + slope + " #", outFC, "ALL")
            print "Completed intersect for " + dataset
            del aspect, slope, outFC
    else:
        print "There are no TINs in the " + env.workspace + " directory."
except:
    # Returns any other error messages
    print arcpy.GetMessages(2)

del arcpy, listTINs

Environments

  • Current Workspace
  • Scratch Workspace
  • Extent
  • Output Coordinate System
  • Geographic Transformations
  • XY Resolution
  • XY Tolerance
  • Output XY Domain
  • Output CONFIG Keyword
  • Auto Commit
  • Terrain Memory Usage

Licensing information

  • Basic: Requires 3D Analyst
  • Standard: Requires 3D Analyst
  • Advanced: Requires 3D Analyst

Related topics

  • An overview of the Triangulated Surface toolset
  • Fundamentals of geoprocessing with the ArcGIS 3D Analyst extension
  • Fundamentals of Surfaces
  • Understanding the shape of a surface
  • What is a TIN surface?

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal