Visibility analysis means determining which areas or specific features are visible from a hypothetical observer (considering location, heading, field of view, and other parameters). This can help answer questions such as: Which apartments have a view of the beach?, Which areas of the terrain are visible from a car driving through it?, or Does anything block the view between my office window and my parking spot?
There are two categories of visibility analysis:
- Viewshed analysis defines areas of the terrain that are visible or not visible for a given observer.
- Line of sight analysis shows which segments are visible along a line (or lines) drawn between pairs of observer and target locations.
In either type of visibility analysis, an elevation surface defines the terrain and the observers may be moving or stationary. For line of sight analysis, targets may also be moving or stationary. Depending on how it is implemented, visibility analysis can be dynamic, updating results in near real time as analysis parameters change.
Viewshed analysis
A viewshed shows the visible and obstructed areas for a single observer. Parameters such as the observer’s location, heading, pitch, and field of view
Viewshed workflows range from quick interactive exploration to full-resolution analysis that can be used in follow-on workflows. For example, you might move an observer interactively over a map to find a suitable tower location, evaluate visibility from a moving platform such as a vehicle or drone, or calculate viewsheds from fixed observation points to identify gaps in coverage. Depending on your requirements, viewshed results may be display-only for rapid visual feedback, or they may be persisted and used as input to additional raster analysis.

The observer can come from user input, a fixed point feature, or a moving object. You can configure a viewshed to evaluate a full 360-degree area around the observer or limit the analysis to a directional sector using parameters such as heading and field of view
While a viewshed defines visible and obstructed areas for a single observer, you can create additional viewsheds to model visibility from multiple observers. Common workflows include comparing individual viewsheds, combining results to identify areas visible to one or more observers, and using combined visibility results to find gaps in coverage.
Viewshed results may be displayed as two visual classes in a geoview: one representing visible areas, and one representing areas of obstructed visibility. By convention these are often green (visible) and red (obstructed), but you can define colors, transparency, or other rendering that are meaningful for your analysis. Areas that are not symbolized for visibility are outside of the observer’s field of view, and therefore not evaluated.
Line of sight analysis
Line of sight analysis indicates whether a target location is visible from an observer’s location. It also shows visibility along a line drawn between the observer(s) and target(s). Segments of the line that are visible can be symbolized differently than segments that are obstructed.
Line of sight workflows are useful when you want to evaluate visibility between known locations instead of calculating visible areas across a surface. Common scenarios include determining whether a communication site can see a receiver, checking whether an observation point has a clear view of a target, or comparing visibility from several candidate observer locations to the same target.

Observers and targets are defined with geographic locations in 3D space, and a line of sight defines visibility between a single observer and a single target. Both the observer and the target can be stationary or moving, depending on the workflow. You can also evaluate multiple observer-target pairs in one analysis to compare results across many locations. For example, you might test several towers against one target, or test one observer against multiple potential targets.
Each line of sight result shows where visibility is unobstructed and where it becomes blocked along the path between the observer and target. This makes line of sight analysis useful not only for determining whether a target is visible, but also for understanding how far along the path the line remains clear before terrain or other surface data obstructs it. Results can be symbolized in a geoview to distinguish visible and obstructed segments, and can also be summarized per observer-target pair to support reporting or comparison workflows.
Examples
Display a dynamic viewshed with the spatial analysis API
To calculate a viewshed with the spatial analysis API, create an elevation surface from raster data, define the observer and analysis parameters, and then evaluate a ViewshedFunction. To display the result dynamically in a map view, wrap the output in a FieldAnalysis and add it to an AnalysisOverlay.
-
Create a graphic overlay, analysis overlay, and elevation field.
Start with a
Mapin aMapView. Add aGraphicsOverlayto show the observer location and anAnalysisOverlayto display the viewshed result. Then create aContinuousFieldfrom an elevation raster. -
Define the observer location and viewshed parameters.
Next, define the observer position using a
Point. Create a graphic to represent the observer and add it to theGraphicsOverlay. ConfigureViewshedParameterswith the observer location and additional settings such as target height, maximum radius, heading, field of view, and elevation sampling interval. -
Create, display, and update the viewshed.
Create a
ContinuousFieldFunctionfrom the elevation field and use it with the viewshed parameters to build aViewshedFunction. To render visible and obstructed areas with different colors, convert the result to aDiscreteFieldFunctionand apply aColormapRenderer. Add the resultingFieldAnalysisto the analysis overlay for dynamic display in the map view.
After the analysis is displayed, you can update it interactively by changing properties on the same ViewshedParameters object. For example, moving the observer position or modifying properties such as target height, heading, and field of view from UI controls. Because the FieldAnalysis references the same viewshed function, the display refreshes automatically when those parameter values change.
Display lines of sight with the spatial analysis API
To perform a line of sight analysis with the spatial analysis API, create an elevation surface from raster data, define observer and target locations, and then evaluate a LineOfSightFunction. Each result provides visible and obstructed line segments that you can symbolize in a map view.
-
Create graphics overlays and load elevation data.
Start with a
Mapin aMapView. Add oneGraphicsOverlayfor observer and target markers and another for line-of-sight result lines. Then create aContinuousFieldfrom an elevation raster. -
Define observer-target pairs for the analysis.
Create a
LineOfSightPositionfor the target and one for each observer location. Then configureLineOfSightParametersusingObserverTargetPairsto define which observers are evaluated against which target locations. -
Evaluate and display line-of-sight results.
Evaluate the
LineOfSightFunctionto getLineOfSightresults. For each result, create graphics for all visible and non-visible line segments, symbolize them differently, and optionally compute visible distance for reporting.
After results are displayed, you can filter or summarize them by observer. For example, you could use the graphics’ TargetVisibility attribute to toggle display of non-visible segments or use GeometryEngine::lengthGeodetic() to report unobstructed distance per observer.