3D viewshed

viewshed analysis

A viewshed analysis indicating the visibility of parts of Yosemite Valley from the summit of El Capitan.

What is viewshed analysis?

A viewshed analysis is type of visibility analysis that calculates and displays the visibility (either visible or obstructed) of 3D elements in a scene from an observer's perspective. A viewshed is calculated from an observer point, which can be a point location, a camera, or a geoelement. You may also provide additional properties such as heading and pitch to set the exact perspective of the observer.

Viewshed analysis has practical applications in urban planning, military science, and many other fields.

A popular use of viewshed analysis is to determine the optimal placement of towers. Companies perform viewshed analysis when planning the location of new cell towers in order to maximize their service coverage. Additionally, the United States Forest Service previously performed viewshed analysis when planning the locations of fire observation towers, though the use of such towers has since been discontinued.

Other real-world use cases for viewshed analysis include the following:

  • Maximizing visibility of a new public park or monument.
  • Minimizing visibility of landfills, parking lots, and oil rigs.
  • Planning the route of hiking trails to create scenic views.

Types of viewshed operations

OperationDescriptionExample
LocationViewshed(Point)Performs viewshed analysis from a point location anywhere in space. viewshed location
LocationViewshed(Camera)Performs viewshed analysis from the perspective of a Camera. viewshed camera
GeoElementViewshedPerforms viewshed analysis from a GeoElement in a scene. viewshed geoelement

How to perform a viewshed analysis

Client-side viewshed analysis can be performed using any of the ArcGIS Maps SDKs for Native Apps. ArcGIS Maps SDK for JavaScript can perform and display server-side viewshed analyses by making a request to an ArcGIS Server Geoprocessing service.

The general steps for performing a viewshed analysis with ArcGIS Maps SDKs for Native Apps are as follows:

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

  2. Create a point, camera, or geoelement to serve as an observer point.

  3. Create a Viewshed for your type of observer and set the necessary properties.

  4. Add the Viewshed to a new AnalysisOverlay.

  5. Add the AnalysisOverlay to the scene view to display the results.

Viewshed observer properties

To perform a viewshed analysis, you set several properties that define a perspective and boundaries for the operation. These properties describe where the observer is looking in 3D space, the size of their field of view, and the minimum/maximum distance they can see.

viewshed-chart
heading

The heading defines the observer's view direction, relative to north. North has a value of 0 (in degrees) and increments upwards as you rotate clockwise.

Code examples

Display a viewshed (Point)

This example performs and displays a viewshed analysis in a scene view from a 3D point location. The observer point and observer perspective are shown in blue. Locations visible from the observer point are displayed in green, while obstructed areas are displayed in red.

Display a viewshed from a point location
ArcGIS Maps SDK for .NETArcGIS Maps SDK for .NETArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for Qt (C++)ArcGIS Maps SDK 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
private void CreateViewshed(MapPoint location)
{
    var viewshed = new LocationViewshed(
        location: location,
        heading: 0,
        pitch: 90,
        horizontalAngle: 360,
        verticalAngle: 180,
        minDistance: 10,
        maxDistance: 500
    );
    _analysisOverlay.Analyses.Add(viewshed);
}

Display a viewshed (Camera)

This example performs and displays a viewshed analysis in a scene view from the perspective of a camera. Once the viewshed operation is complete, the scene may be panned to view visible and obstructed areas.

Display a viewshed from the perspective of a camera
ArcGIS Maps SDK for .NETArcGIS Maps SDK for .NETArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for Qt (C++)ArcGIS Maps SDK 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
private void CreateViewshed(Camera observerCamera)
{
    var viewshed = new LocationViewshed(
        camera: observerCamera,
        minDistance: 10,
        maxDistance: 500
    );
    _analysisOverlay.Analyses.Add(viewshed);
}

Display a viewshed (GeoElement)

This example performs and displays a viewshed analysis in a scene view from the perspective of a tank geoelement. The viewshed operation dynamically responds when the tank moves to determine the viewpoint of someone driving down the road.

Display a viewshed from a geoelement
ArcGIS Maps SDK for .NETArcGIS Maps SDK for .NETArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for Qt (C++)ArcGIS Maps SDK 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
private void CreateViewshed(GeoElement geoElement)
{
    var viewshed = new GeoElementViewshed(
        geoElement: geoElement,
        horizontalAngle: 90,
        verticalAngle: 40,
        minDistance: 1,
        maxDistance: 250,
        headingOffset: 0,
        pitchOffset: 0
    );
    _analysisOverlay.Analyses.Add(viewshed);
}

Tutorials

API support

Viewshed analysisLine of sight analysisDistance measurementArea measurement
ArcGIS Maps SDK for JavaScript12
ArcGIS Maps SDK for .NET
ArcGIS Maps SDK for Kotlin
ArcGIS Maps SDK for Swift
ArcGIS Maps SDK for Java
ArcGIS Maps SDK for Qt
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet
MapBox GL JS
OpenLayers
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.