ArcGIS for Desktop

  • 文档
  • 合约
  • 支持

  • My Profile
  • 帮助
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS for Desktop

全面的专业性 GIS

ArcGIS for Server

面向企业的 GIS

ArcGIS for Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 合约
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

帮助

  • 主页
  • 入门
  • 制图
  • 分析
  • 管理数据
  • 工具
  • 更多...

堆栈剖面

  • 摘要
  • 插图
  • 用法
  • 语法
  • 代码实例
  • 环境
  • 许可信息

摘要

创建表格和可选图表,用于说明一个或多个多面体、栅格、TIN 或 terrain 表面上的线要素的剖面。

插图

Stack Profile example

用法

  • 如果填充了输出图表名称参数并且在 ArcMap、ArcScene 或 ArcGlobe 中执行工具,则生成的图表将会显示在屏幕上。

  • 输出表提供生成剖面图所需的信息。每个线要素均通过沿线引入新折点,以捕捉剖面特征的方式,沿其重叠剖面目标增密。沿此增密方法创建的输入线的高程和距离,和有关线要素及剖面目标的其余信息一起存储在输出表中。其字段中的值可用于在多种外部应用程序中创建图表。字段表示:

    • FIRST_DIST - 到剖面段中第一个折点的距离。
    • FIRST_Z - 剖面段中第一个折点的高度。
    • SEC_DIST - 剖面段中第二个折点的距离。
    • SEC_Z - 剖面段中第二个折点的高度。
    • LINE_ID - 用于定义剖面的线要素的唯一 ID。
    • SRC_TYPE - 剖面源的数据类型,即表面或多面体。
    • SRC_ID - 要描绘剖面的多面体要素的唯一 ID。不适用于表面输入。
    • SRC_NAME - 剖面源的名称和路径。

语法

StackProfile_3d (in_line_features, profile_targets, out_table, {out_graph})
参数说明数据类型
in_line_features

将在表面输入上描绘剖面的线要素。

Feature Layer
profile_targets
[profile_targets,...]

剖面的数据,可由多面体要素和表面模型(如栅格、TIN、terrain 或 LAS 数据集)的任意组合组成。

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

输出表存储每个剖面的插值测量值。

Table
out_graph
(可选)

可在 ArcMap、ArcScene 或 ArcGlobe 中查看的输出图形的名称。

Graph

代码实例

堆栈剖面 (StackProfile) 示例 1(Python 窗口)

下面的示例演示了如何在 Python 窗口中使用此工具。

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) 示例 2(独立脚本)

下面的示例演示了如何在独立 Python 脚本中使用此工具。

'''**********************************************************************
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)

环境

  • 当前工作空间
  • 输出坐标系
  • 范围
  • 地理变换

相关主题

  • 功能性表面工具集概述
  • 有关使用 ArcGIS 3D Analyst 扩展模块进行地理处理的基础知识
  • 有关表面的基础知识
  • 了解表面的形状
有关此主题的反馈?

ArcGIS for Desktop

  • 主页
  • 文档
  • 合约
  • 支持

ArcGIS 平台

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

关于 Esri

  • 关于我们
  • 招贤纳士
  • 内部人员博客
  • 用户大会
  • 开发者峰会
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | 隐私政策 | 法律声明