Available with Advanced license.
Available with 3D Analyst license.
Summary
Creates lines of sight between observers and targets.
Usage
This tool uses Construct Sight Lines and Line Of Sight from the 3D Analyst toolbox.
The observer is the start point and the target is the endpoint of the line used to determine visibility.
One or more observers and one or more target point features will be used.
All observers are matched with all targets.
Resulting lines are colored to show visible sections (green) and nonvisible sections (red).
The following fields are added to the Output Sight Line Feature Class:
- OID_OBSERV—The Object ID of the observer point used to create the sight line
- OID_TARGET—The Object ID of the target point used to create the sight line
- TarIsVis—Indicates whether the target is visible (1) or not visible (0) to the observer along each sight line
- AZIMUTH—The azimuth from the observer location to the target
- VERT_ANGLE—The viewing angle looking up or down (negative) from the observer to the target
The following fields are added to the Output Line Of Sight Feature Class:
- OID_OBSERV—The Object ID of the observer point used to create the sight line
- OID_TARGET—The Object ID of the target point used to create the sight line
- VisCode—Indicates whether the surface segment is visible (1) to the observer or not visible (2)
- TarIsVis—Indicates whether the target is visible (1) or not visible (0) to the observer along each sight line
- AZIMUTH—The azimuth from the observer location to the target
- ObsSPOT—The elevation of the observer
- TgtSPOT—The elevation of the target
The following fields are added to the Output Observer Feature Class:
- OID_OBSERV—The Object ID of the observer point used to create the line of sight
- OID_TARGET—The Object ID of the target point used to create the line of sight
- AZIMUTH—The azimuth from the observer location to the target
- VERT_ANGLE—The viewing angle looking up or down (negative) from the observer to the target
- TarIsVis—Indicates Whether the target is visible (1) or not visible (0) to the observer along each sight line
- Z—The surface elevation at the observer location
- ObsSPOT—The elevation of the observer
The following fields are added to the Output Target Feature Class:
- OID_OBSERV—The Object ID of the observer point used to create the line of sight
- OID_TARGET—The Object ID of the target point used to create the line of sight
- AZIMUTH—The azimuth from the observer location to the target
- VERT_ANGLE—The viewing angle looking up or down (negative) from the observer to the target
- TarIsVis—Indicates whether the target is visible (1) or not visible (0) to the observer along each sight line
- Z—The surface elevation at the target location
- TgtSPOT—The elevation of the target
Height units are in the units of the elevation surface.
The tool uses earth curvature and refractivity calculations if the input surface supports them.
If obstruction features are used, the resulting surface profile lines do not follow the surface profile but extend directly between observer and target. This changes the optional profile graph.
Syntax
arcpy.defense.LinearLineOfSight(in_observer_features, in_target_features, in_surface, out_los_feature_class, out_sight_line_feature_class, out_observer_feature_class, out_target_feature_class, {in_obstruction_features}, {observer_height_above_surface}, {target_height_above_surface}, {add_profile_attachment})
Parameter | Explanation | Data Type |
in_observer_features | The input observer points. | Feature Set |
in_target_features | The input target points. | Feature Set |
in_surface | The input elevation raster surface. | Raster Layer |
out_los_feature_class | The output feature class showing lines of visible and nonvisible surface areas. | Feature Class |
out_sight_line_feature_class | The output line feature class showing the direct line of sight between observer and target. | Feature Class |
out_observer_feature_class | The output observer point feature class. | Feature Class |
out_target_feature_class | The output target point feature class. | Feature Class |
in_obstruction_features (Optional) | The input multipatch feature that may obstruct the lines of sight. | Feature Layer |
observer_height_above_surface (Optional) | The height added to the surface elevation of the observer. The default is 2. | Double |
target_height_above_surface (Optional) | The height added to the surface elevation of the target. The default is 0. | Double |
add_profile_attachment (Optional) | Specifies whether the tool will add an attachment to the feature with the profile (cross section terrain graph) between observer and target.
| Boolean |
Code sample
The following Python window script demonstrates how to use the LinearLineOfSight function.
import arcpy
arcpy.env.workspace = r"C:/Data.gdb"
arcpy.LinearLineOfSight_defense("LLOS_Obs",
"LLOS_Tar",
"n36.dt2",
"LineOfSight",
"SightLines",
"Observers",
"Targets",
None,
2,
0,
"NO_PROFILE_GRAPH")
The following example uses the LinearLineOfSight function in a sample workflow script.
# Description: Create Linear Line of Sight to test siting of a radio antenna
# Import system modules
import arcpy
# Set environment settings
arcpy.env.workspace = r"C:/Data.gdb"
# Select antenna to test
antenna_layer = "antennas"
whereClause = "antenna_call_sign = 'KJT'"
test_ant_layer = arcpy.MakeFeatureLayer_management(antenna_layer, whereClause)
# Select observer test location
obs_layer = "observer_locations"
whereClause = "site_name = 'test_site'"
test_obs_layer = arcpy.MakeFeatureLayer_management(obs_layer, whereClause)
# Inputs
input_surface = "n36.dt2"
# Create line of sight between selected antenna and observer locations
arcpy.LinearLineOfSight_defense(test_obs_layer,
test_ant_layer,
input_surface,
"LineOfSight",
"SightLines",
"Test_Observers",
"Test_Targets",
None,
2,
0,
"NO_PROFILE_GRAPH")
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Yes