Skyline Graph (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Calculates sky visibility and generates an optional table and polar graph.

The table and graph represent the horizontal and vertical angles going from the observer point to each of the vertices on the skyline.

Illustration

Skyline Graph

Usage

Syntax

SkylineGraph_3d (in_observer_point_features, in_line_features, {base_visibility_angle}, {additional_fields}, {out_angles_table}, {out_graph})
ParameterExplanationData Type
in_observer_point_features

The input features containing one or more observer points.

Feature Layer
in_line_features

The line feature class representing the skyline.

Feature Layer
base_visibility_angle
(Optional)

The vertical angle which is used as the baseline for calculating percentage of visible sky; 0 is the horizon, 90 is straight up; -90 is straight down. The default is 0.

Double
additional_fields
(Optional)

Determines whether to output additional fields to the table, rather than just the two angle values.

  • NO_ ADDITIONAL_FIELDSThe additional fields will not be output. This is the default.
  • ADDITIONAL_FIELDSThe additional fields will be output.
Boolean
out_angles_table
(Optional)

The table to be created for outputting the angles. The default is blank, meaning no table.

Table
out_graph
(Optional)

The name of the optional graph. A table has to be generated in order for the graph to be made. The graph will be displayed and can be saved and/or edited. The default is blank, meaning no graph.

Graph

Code Sample

SkylineGraph 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.SkylineGraph_3d("observers.shp", "skyline_outline.shp", 0, "ADDITIONAL_FIELDS", "table.dbf")
SkylineGraph example 2 (stand-alone script)

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)

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