3D line of sight

Visual lines of sight from an observer point to target locations in Yosemite valley.

What is line of sight analysis?

3D line of sight analysis is a type of visibility analysis that calculates whether a target location is visible from an observer location and renders a line indicating visibility to the scene view. You can perform it in real-time to dynamically update whenever an observer or target moves.

The line returned by the analysis contains two segments based on what can be seen by the observer and what is obstructed. Starting from the observer, the line displays with a color indicating visibility (the default is green) until it encounters an obstruction, and afterward the remaining segment displays with a color indicating that the view is obstructed (the default is red).

Line of sight analysis requires that you specify observer and target locations, which can be either a point location or a geoelement. The observer and target parameters must be of the same type.

Line of sight analysis has practical applications in architecture, military science, and many other fields.

Real-world use cases for line of sight analysis include the following:

  • Designing civic structures such as roads and theatres.
  • Minimizing the visibility of oil rigs and junkyards in urban areas.
  • Preserving key views of famous landmarks and parks in city skylines.

Types of line of sight operations

The following table describes the different types of 3D line of sight operations:

OperationDescriptionExample
LocationLineOfSight(observer, target), LineOfSightAnalysisPerforms a line of sight analysis between two point locations in a scene. lineofsight location square
GeoElementLineOfSight(observer, target)Performs a line of sight analysis between two geoelements in a scene. lineofsight geoelement square

How to perform a line of sight analysis

The general steps to perform a line of sight analysis are as follows:

  1. Create a scene view and set its extent to the desired location.

  2. Create a point or geoelement to serve as an observer, then create a second to serve as a target.

  3. Create a LineOfSight analysis that matches the type of your observer and target.

  4. Add the LineOfSight analysis to the scene view to display the results.

Examples

Display a line of sight (Point)

This example performs and displays a line of sight analysis in a scene view at the provided observer and target locations (3D points). Line of sight analysis can be performed by either using the analysis operation directly or using the JavaScript LineOfSight widget.

ArcGIS API for JavaScriptArcGIS API for JavaScriptArcGIS Runtime API for AndroidArcGIS Runtime API for iOSArcGIS Runtime API for JavaArcGIS Runtime API for .NETArcGIS Runtime API for Qt (C++)ArcGIS Runtime API for Qt (QML)
Expand
Use dark colors for code blocksCopy
                                                                                                                                                                  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
      viewModel.observer = new Point({
        latitude: 37.7462,
        longitude: -119.5743,
        z: 1300
      });

      viewModel.targets = [
        createTarget(37.7339, -119.6377, 2300), // El capitan
        createTarget(37.7459, -119.5332, 2700), // Half dome
        createTarget(37.7130, -119.6046, 2300), // Taft point
        createTarget(37.7566, -119.5969, 2250), // Yosemite falls
        createTarget(37.7569, -119.5599, 2300), // North dome
        createTarget(37.7677, -119.4894, 2800), // Clouds rest
        createTarget(37.7230, -119.5843, 2450), // Sentinel Dome
        createTarget(37.7248, -119.5333, 1800) // Nevada falls
      ];

      function createTarget(lat, lon, z) {
        return {
          location: new Point({
            latitude: lat,
            longitude: lon,
            z: z || 0
          })
        };
      }

Display a line of sight (GeoElement)

This example performs and displays a line of sight analysis in a scene view at the provided observer (taxi) and target (building) geoelements, updating the analysis dynamically whenever the geoelement taxi changes position.

lineofsight-geoelement

ArcGIS Runtime API for AndroidArcGIS Runtime API for AndroidArcGIS Runtime API for iOSArcGIS Runtime API for JavaArcGIS Runtime API for .NETArcGIS Runtime API for Qt (C++)ArcGIS Runtime API for Qt (QML)
Expand
Use dark colors for code blocksCopy
                                                     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

GeoElementLineOfSight lineOfSight = new GeoElementLineOfSight(observer, mTaxiGraphic);
analysisOverlay.getAnalyses().add(lineOfSight);

Tutorials

API support

Full supportPartial supportNo support
  • 1. Access with geoprocessing task
  • 2. Supports point location line of sight

Tool support

Viewshed analysisLine of sight analysisDistance measurementArea measurement
ArcGIS Pro
ArcGIS Scene Viewer
Full supportPartial supportNo support

    Tools

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.