Line of Sight (3D Analyst)

Uses an input 2D or 3D polyline feature class along with a raster, TIN, or terrain surface to determine visibility between 'from' and 'to' points.

Produces an output line feature class that contains line and target visibility information.

If one or more targets are not visible, the Line of Sight tool produces an output point feature class. This contains the location of the first obstruction encountered for each line whose target is not visible.

Learn more about how Line of Sight (3D Analyst) works


Usage tips

Syntax

LineOfSight_3d (in_surface, in_line_feature_class, out_los_feature_class, out_obstruction_feature_class, use_curvature, use_refraction, refraction_factor, pyramid_level_resolution)
Parameter Explanation Datatype
Input Surface (Required)

The input raster, TIN, or Terrain surface on which calculations will be based.

Tin Layer | Raster Layer
Input Line Feature Class (Required)

The input polyline feature class along which visibility will be calculated. This may be a 2-D or 3-D feature class.

Feature Layer
Output Line of Sight Feature Class (Required)

The output line feature class along which visibility has been determined. Two attribute fields are created. VisCode indicates visibility along the line, 1 being visible and 2 not visible. TarIsVis indicates the target visibility, 0 being not visible and 1 being visible.

Feature Class
Output Obstruction Point Feature Class (Optional)

The output point feature class indicating the first obstruction point along the line of sight if the target is not visible.

Feature Class
Use Curvature (Optional)

Use this option to incorporate earth curvature in the calculation. For this option to be enabled, the surface needs to have a defined spatial reference in projected coordinates with defined z units.

Boolean
Use Refraction (Optional)

Use this option to incorporate atmospheric refraction of light in the calculation.

Boolean
Refraction Factor (Optional)

Provides a value to be used in the refraction factor. The default refraction factor is 0.13.

Double
Pyramid Level Resolution (Optional)

The resolution, given in z-tolerance, of the pyramid level to use for conversion. The default is 0, full resolution.

Double
Data types for geoprocessing tool parameters

Script Example

# Purpose: Create a line of sight (LOS) feature class based on a surface and an input polyline feature class.

# Create the Geoprocessor object
import arcgisscripting
gp = arcgisscripting.create()

#Check out the 3D Analyst extension
gp.CheckOutExtension ("3D")

try:
    # Set the workspace (to avoid having to type in the full path to the data every time)
    gp.workspace = "D:/Docs1/GP/GPOutput"

    # Select the 3D Analyst Toolbox
    gp.toolbox = "3D"

    # Process: Creating a LOS using a 2D line and a TIN surface
    gp.lineofsight_3d ("dtm_tin", "aLine.shp", "LOS_aLine.shp")

except:
    # If an error occurred while running the tool print the error messages.
    print gp.GetMessages()

See Also

  • Overview of the Functional Surface toolset
  • Interpolate Shape (3D Analyst)
  • Surface Length (3D Analyst)