Surface Aspect (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Creates polygon features that represent ranges of the horizontal direction of slope measurements from a triangulated surface.

Illustration

TIN Aspect illustration

Usage

Syntax

SurfaceAspect_3d (in_surface, out_feature_class, {class_breaks_table}, {aspect_field}, {pyramid_level_resolution})
ParameterExplanationData Type
in_surface

The TIN, terrain, or LAS dataset surface whose aspect values will be written to the output polygon.

LAS Dataset Layer; Terrain Layer; TIN Layer
out_feature_class

The output feature class.

Feature Class
class_breaks_table
(Optional)

A table containing the classification breaks that will be used to define the aspect ranges in the output feature class.

Table
aspect_field
(Optional)

The field containing aspect code values.

String
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

SurfaceAspect 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.SurfaceVolume_3d("sample.gdb/featuredataset/terrain", "surf_vol.txt", 
                      "ABOVE", 300, 1, 5)
SurfaceAspect example 2 (stand-alone script)

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

'''****************************************************************************
Name: Surface Volume Example
Description: This script demonstrates how to use the 
             Surface Volume tool.
             
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
import exceptions, sys, traceback

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension("3D")
    # Set environment settings
    env.workspace = "C:/data"
    # Set Local Variables
    inSurface = "elevation_tin"
    #Execute SurfaceVolume
    result = arcpy.SurfaceVolume_3d(inSurface, "", "ABOVE", "300", "1", "5")
    print result.GetMessage(0)

except arcpy.ExecuteError:
    print arcpy.GetMessages()
except:
    # Get the traceback object
    tb = sys.exc_info()[2]
    tbinfo = traceback.format_tb(tb)[0]
    # Concatenate error information into message string
    pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
          .format(tbinfo, str(sys.exc_info()[1]))
    msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
    # Return python error messages for script tool or Python Window
    arcpy.AddError(pymsg)
    arcpy.AddError(msgs)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
3/7/2014