天际线图 (3D Analyst)

摘要

计算天空的可见性,并选择性地生成表和极线图。

所生成的表和图用于表示从观察点到天际线上每个折点的水平角和垂直角。

插图

Skyline Graph

用法

语法

SkylineGraph_3d (in_observer_point_features, in_line_features, {base_visibility_angle}, {additional_fields}, {out_angles_table}, {out_graph})
参数说明数据类型
in_observer_point_features

The input features containing one or more observer points.

Feature Layer
in_line_features

表示天际线的线要素类。

Feature Layer
base_visibility_angle
(可选)

用作计算可见天空百分比的基线的垂直角;0 表示水平,90 表示竖直向上;-90 表示竖直向下。默认值为 0。

Double
additional_fields
(可选)

确定除两个角度值之外,是否也将附加字段输出到表中。

  • NO_ADDITIONAL_FIELDS将不会输出附加字段。这是默认设置。
  • ADDITIONAL_FIELDS将输出附加字段。
Boolean
out_angles_table
(可选)

创建用于输出角度的表。默认值为空,即没有表。

Table
out_graph
(可选)

可选图表的名称。必须先生成一个表格才能生成图。可以显示、保存和/或编辑所生成的图。默认为空,即没有图。

Graph

代码示例

SkylineGraph 示例 1(Python 窗口)

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.SkylineGraph_3d("observers.shp", "skyline_outline.shp", 0, "ADDITIONAL_FIELDS", "table.dbf")
SkylineGraph 示例 2(独立脚本)

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

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

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension('3D')
    # Set environment settings
    env.workspace = 'C:/data'
    # Set Local Variables
    inPts = "observers.shp"
    inLines = "skyline_outline.shp"
    baseVisibility = 25
    # Ensure output table has unique name
    outTable = arcpy.CreateUniqueName("angles_table.dbf")
    
    #Execute SkylineGraph
    arcpy.SkylineGraph_3d(inPts, inLines, 0, "ADDITIONAL_FIELDS", outTable)


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)

环境

相关主题

许可信息

ArcView: 需要 3D Analyst
ArcEditor: 需要 3D Analyst
ArcInfo: 需要 3D Analyst

7/10/2012