Stack Profile (3D Analyst)

Summary

Creates a table and optional graph denoting the profile of line features over one or more multipatch, raster, TIN, or terrain surfaces.

Usage

  • Each input line is densified to interpolate the height along its overlapping profile targets. The elevation and distance along the input lines created by this densification gets stored in the output table along with information about the line features and profile targets.

  • The following fields in the output table provide the information needed for generating a graph in any graphing application:

    • FIRST_DIST—Distance to the first vertex in the profile segment.
    • FIRST_Z—Height of the first vertex in the profile segment.
    • SEC_DIST—Distance of the second vertex in the profile segment.
    • SEC_Z—Height of the second vertex in the profile segment.
    • LINE_ID—Unique ID of the line feature used to define the profile.
    • SRC_TYPE—Data type of the profile's source, which is either a surface or multipatch.
    • SRC_ID—Unique ID of the multipatch feature being profiled. Not applicable for surface inputs.
    • SRC_NAME—Name and path to the profile's source.

Parameters

LabelExplanationData Type
Input Line Features

The line features that will be profiled over the surface inputs.

Feature Layer
Profile Targets

The data being profiled, which can be comprised from any combination of multipatch features, raster, and triangulated surface models.

Feature Layer; LAS Dataset Layer; Mosaic Layer; Raster Layer; Terrain Layer; TIN Layer
Output Table

The output table that will store the height interpolated for each profile target that intersects the input line.

Table
Output Graph Name
(Optional)

The output graph is not supported in Pro.

Graph

arcpy.ddd.StackProfile(in_line_features, profile_targets, out_table, {out_graph})
NameExplanationData Type
in_line_features

The line features that will be profiled over the surface inputs.

Feature Layer
profile_targets
[profile_targets,...]

The data being profiled, which can be comprised from any combination of multipatch features, raster, and triangulated surface models.

Feature Layer; LAS Dataset Layer; Mosaic Layer; Raster Layer; Terrain Layer; TIN Layer
out_table

The output table that will store the height interpolated for each profile target that intersects the input line.

Table
out_graph
(Optional)

The output graph is not supported in Pro.

Graph

Code sample

StackProfile example 1 (Python window)

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

arcpy.env.workspace = 'C:/data'
arcpy.StackProfile_3d('profile_line.shp', profile_targets=['dem.tif', 'buildings.shp'],
                      out_table='profile_values.dbf')
StackProfile example 2 (stand-alone script)

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

'''**********************************************************************
Name: Save Profiles to Graph Files
Description: Creates profile graphs of multipatch and surface features,
             which are then saved as graph files.
**********************************************************************'''
# Import system modules
import arcpy

# Set Local Variables
profileLine = arcpy.GetParameterAsText(0)
profileTargets = arcpy.GetParameterAsText(1) # input las files
profileTable = arcpy.CreateUniqueName('profile_table', 'in_memory')
graphName = "Sample Graph"
outGraph = arcpy.GetParameterAsText(2) # output graph file

# Execute StackProfile
arcpy.ddd.StackProfile(profileLine, profileTargets, profileTable, graphName)

# Execute SaveGraph
arcpy.management.SaveGraph(graphName, outGraph)

Licensing information

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

Related topics