ArcGIS Desktop

  • Documentation
  • Support

  • 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 for 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

Stack Profile

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

Summary

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

Illustration

Stack Profile example

Usage

  • If the Output Graph Name parameter is populated and the tool is executed in ArcMap, ArcScene, or ArcGlobe, the resulting graph will be displayed on-screen.

  • The output table provides the information needed for generating the profile graph. Each line feature is densified along its overlapping profile targets in a manner that captures the profile's characteristics by introducing new vertices along the line. The elevation and distance along the input lines created by this densification gets stored in the output table along with the additional information about the line features and profile targets. The values in its fields can be used to create graphs in a wide variety of external applications. The fields represent:

    • 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.

Syntax

StackProfile_3d (in_line_features, profile_targets, out_table, {out_graph})
ParameterExplanationData 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 interpolated measurements for each profile.

Table
out_graph
(Optional)

The name of the output graph that can be viewed in ArcMap, ArcScene, or ArcGlobe.

Graph

Code sample

StackProfile 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.StackProfile_3d('profile_line.shp', 'dem.tif; buildings.shp', 
                     'profile_values.dbf', 'Surface Profile')
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
import exceptions, sys, traceback

# 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

try:
    arcpy.CheckOutExtension('3D')
    # Execute StackProfile
    arcpy.ddd.StackProfile(profileLine, profileTargets, profileTable, graphName)
    # Execute SaveGraph
    arcpy.management.SaveGraph(graphName, outGraph)
    arcpy.CheckInExtension('3D')
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

  • Current Workspace
  • Output Coordinate System
  • Extent
  • Geographic Transformations

Licensing information

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

Related topics

  • An overview of the Functional Surface toolset
  • Fundamentals of geoprocessing with the ArcGIS 3D Analyst extension
  • Fundamentals of Surfaces
  • Understanding the shape of a surface

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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