A "viewshed" is a region visible to an observer. "Visibility" refers to line of sight, but the same concept and calculations apply to transmission of signals in other media: radio and microwave frequency waves, sonar, and radar.
Viewsheds can help answer many different kinds of questions:
| How to situate infrastructure, such as pipelines and highways, in out-of-the way places that do not destroy the quality of natural scenery | |
| Where to site transmission towers to avoid spatial gaps in reception | |
| How to characterize regions under surveillance (or not under surveillance) |
The simplest viewshed calculations suppose that light moves in straight lines in a Euclidean space (the earth is not curved and no refraction occurs). This is a good approximation for distances of several kilometers or miles. Corrections for the earth's curvature and for optical refraction in the earth's atmosphere are needed for accurate results over longer distances.
To be realistic and to economize on computation time, many GISes allow several parameters to control a viewshed calculation. They play essentially two kinds of roles:
![]()
The visibility request computes a viewshed for a digital elevation model (DEM). Its inputs consist of a point theme to represent observers and parameter values (for each observer, maintained as attributes in the point theme) to control the calculation. The usual Spatial Analyst interface provides no access to this request.
| A sample extension, vistools.avx, is provided with the software. You will find it in ESRI/AV_GIS30/ArcView/Samples/Ext. To access it, simply copy this file into the ESRI/AV_GIS30/ArcView/Ext32 folder. It will appear in the Extensions list as "Sample Visibility Tools Extension." However, it works poorly and frequently fails mysteriously. Furthermore, it automatically converts visibility grids to shapefiles, which is undesirable because it makes further processing difficult. |
A good place to start is the ArcView help for "Visibility". There is a link here to "Discussion" and "Example" pages. We will show how to use this information for visibility computations.
Open the DEM as a grid theme in ArcView. Establish the correct projection in the View's properties dialog.
Hillshade the DEM. You will use this hillshade later on to visualize the visibility results.
Go to the "Example" link for the visibility request in the ArcView help. Copy the script offered there into a new script editor document in ArcView. This script refers to the elevation grid and assumes it is named "Elevgrd". Either rename your elevation grid "Elevgrd" or change the script so that it refers to the name of your grid. In our example, "Mosaic" is the name of the elevation grid. Here, then, is the modified script with our comments on the right.
|
theView = av.GetActiveDoc |
This assumes the script will be run from the view. |
|
theTheme = theView.GetActiveThemes.Get(0) |
The observers theme will be the topmost (zeroth) active theme in the view. This line will cause an error if no theme is active or if the first active theme is not an observers (point) theme. |
|
theFTab = theTheme.GetFTab |
The "FTab" is the underlying feature table for the observers theme. It is the "FTab" object mentioned in the visibility discussion in the ArcView help. |
|
theGrid = theView.FindTheme("Mosaic").GetGrid |
This is the line referencing the elevation grid by name. Use the name of your grid in place of "Mosaic" here. |
|
thePrj = theView.GetProjection |
The view's projection. |
|
theResult = theGrid.Visibility(theFTab,thePrj,FALSE) |
This line does all the work. Compare it to the synopsis of the visibility request in the ArcView help for "visibility". |
|
theGTheme = GTheme.Make(theResult) |
Create a grid theme ("GTheme") from the result. |
|
' check for error during operation |
This line really should come before the preceding one. |
|
theView.AddTheme(theGTheme) |
Add the result as a theme to the view. |
Compile the script. Fix any errors until it compiles correctly.
Create a new point theme to
represent the observation points. Make sure all observation points
are located within the DEM (and not on NoData cells). Add
observation points to this theme.

Open the theme's attribute table. Create
numeric fields named "OFFSETA" and "OFFSETB". They
must have these names. After creating them, use the field
calculator or the cell editing tool to fill them with positive values.
[OFFSETA] describes the elevation of each observer. [OFFSETB]
describes the elevations of objects to be observed from each point.
Typical values are 2.0 to 100.0 meters, depending on the application.

You may add additional fields as described in the "discussion"
link in the ArcView help. Take care to give the fields exactly the
names provided in the discussion.
Stop editing the theme. Save the edits. Activate the theme if it is not already active. Select the points to use in the calculation (or clear the selection to use them all). You are all ready to go.
Activate the script again. Make sure the View was the last document active before you activate the script. Run the script.
If all goes well, the script will add a new theme to the top of the Table of Contents. The values in this theme count the number of observers able to see each location. Name this theme "visibility" if you like. Move the observers theme above this theme so the observer locations will be visible in the view.
Edit the legend to visualize the observer counts in the new visibility theme. Graduated color is a good choice.
While in the legend editor for the visibility
theme, press the "Advanced" button. Specify the DEM's
hillshade as the "brightness theme."

The example contains an extremely rugged elevation theme--elevations vary by over seven kilometers within a space spanning some 140 kilometers. The observation points are along the southern slopes of the highest peaks in the region. Nevertheless, it is evident that only the tips of neighboring mountains are generally visible. The bottoms of valleys cannot be seen. (This viewshed is at best an approximation, because the extent of the view is great enough for curvature and refraction phenomena to play an important role.)
If you are satisfied with the results and want to keep them, activate the visibility theme and select the Theme|Save dataset option. Provide a simple (DOS 8.3) name for it.
![]()
| Link here to see a visibility calculation for part of the Blue Ridge Mountains in Virginia. The observers are located at 30 meter intervals along the Blue Ridge Parkway, shown as a yellow-green linear feature near the mountain ridge. The five thick numbered lines were potential locations for a new highway. The blue lines are the streets of Roanoke. The hillshaded grid indicates extent of visibility using a scale graduating from greens (visible from very few parts of the Parkway) through dark reds (visible from many parts of the Parkway). The analyst went on to overlay the potential highway locations with the visibility results to measure the scenic impact of each proposed route. (Map courtesy Ben Logan, Virginia Tech, 1998.) |
|
Link here to see a detail of the Blue Ridge Mountain visibility map. The thick green line shows the first 330 of the more than 1,000 points used for this calculation, which took about a day on a 300 MHz Pentium-II PC to execute. |
![]()