Surface Slope (3D Analyst)
Summary
Creates polygon features from the triangle slope values of a TIN or terrain dataset.
Illustration
Usage
-
Use the Class Breaks Table parameter to constrain slope information into specific break intervals of the output feature class.
Customized slope classifications can be provided through a Class Breaks Table consisting of up to two columns. The first column will always indicate the classification break value. If the second column is available, it will be used to define the code that corresponds with the slope class. Consider the following example:
CLASS_BREAK
CODE
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.
-
Units are only honored when using a class breaks table.
Syntax
Parameter | Explanation | Data Type |
in_surface |
The input terrain or TIN dataset. | Tin Layer; Terrain Layer |
out_feature_class |
The output feature class. | Feature Class |
units (Optional) |
The units of measure to be used in calculating slope.
| String |
class_breaks_table (Optional) |
A table containing the classification breaks that will be used to classify 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 elevation values will be multiplied. This is typically used to convert Z linear units that match those of the XY linear units. The default is 1, which leaves elevation values unchanged. | 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
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")
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