A viewshed analysis indicating the visibility of parts of Yosemite Valley from the summit of El Capitan.
What is viewshed analysis?
A viewshedx,y coordinates and a spatial reference.
The result of viewshed analysis is a viewshed
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
| Operation | Description | Example |
|---|---|---|
Location | Performs viewshed analysis from a point locationx,y coordinates and a spatial reference. |
|
Location | Performs viewshed analysis from the perspective of a Camera |
|
Geo | Performs viewshed analysis from a GeoElement |
|
How to perform a viewshed analysis
Client-side viewshed analysis can be performed using the ArcGIS Maps SDKs for Native Apps
The general steps for performing a viewshed analysis are:
-
Create a scene view
A scene view is a user interface that displays scene layers and graphics in 3D. It uses a camera to control the visible area of the scene and supports user interactions such as pan, zoom, tilt, and rotate. and set its extentAn extent is a bounding rectangle with points that delineate an area for a map or scene. to the desired location. -
Create an observer location.
-
Create a
Viewshedfor your type of observer and set the necessary properties. -
Visualize the analysis by adding it the view.
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
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.
const viewshed = new Viewshed({
observer: location,
heading: 0,
tilt: 90,
horizontalFieldOfView: 360,
verticalFieldOfView: 180,
farDistance: 500
});
const viewshedAnalysis = new ViewshedAnalysis({ viewsheds: [viewshed] });
view.analyses.add(viewshedAnalysis);Display a viewshed (Camera)
This example performs and displays a viewshed analysis in a scene view from the perspective of a camera

private void CreateViewshed(Camera observerCamera)
{
var viewshed = new ExploratoryLocationViewshed(
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

private void CreateViewshed(GeoElement geoElement)
{
var viewshed = new ExploratoryGeoElementViewshed(
geoElement: geoElement,
horizontalAngle: 90,
verticalAngle: 40,
minDistance: 1,
maxDistance: 250,
headingOffset: 0,
pitchOffset: 0
);
_analysisOverlay.Analyses.Add(viewshed);
}