full quadrangle
San Francisco North quadrangle

Presidio and Park
Presidio and Golden Gate Park
with labels and a GPS path

downtown and wharves
Downtown and wharves

Angel Island
Angel Island

Stanford University
Stanford University
from the Palo Alto map

A DLG Viewer for Unix

Topographic maps of the United States Geological Survey (USGS) are well known to hikers. The USGS has digitized many of these maps and published them on the Web as Digital Line Graph (DLG) files in vector form. The USGS developed and released a viewer for these files, but it runs only on Microsoft Windows.

dlgvu is an interactive viewer for Unix, written in the Icon programming language. It reads DLG files to produce maps such as those shown at the left. Click on any image to see a full-size screen snapshot.

dlgvu can also overlay one or more paths atop a map, as shown in the second image; many handheld GPS receivers are capable of recording such paths.


dlgvu loads map and paths specified by command-line arguments and displays them in a window. Multiple maps are properly joined. Interaction is via mouse and keyboard.

The left mouse button sweeps out an area for zooming. The right mouse button displays the coordinates of the pointer along with the map scale. Shift-clicking is used to add a label or print coordinates.

Keyboard characters perform other actions:

  • Hiding or displaying map layers (for example, the contour lines)
  • Zooming or panning
  • Printing (by writing a PostScript file)

For a more detailed description, see the program documentation.

Downloading and Building

If you haven't done this earlier, download and install Icon for Unix. Binaries are available for most popular platforms, or you can build it from source.

Then, download dlgvu.icn and build it with the command icont dlgvu.icn.

You may find it convenient to package DLG files in ZIP archives, as is used with the sample datasets below. When unzip is in your path, dlgvu can read zipped datasets through a pipe without ever unpacking them to disk. If you don't already have the zip and unzip utilities, you can get them from the Info-ZIP website.

Sample Data Files

These sample files show some of the variety available in DLG maps. They are ZIP archives directly usable with dlgvu.

180K 1:24000 quadrangle: Key West, FL, a relatively small dataset
1010K 1:24000 quadrangle: Two Harbors, MN, a rural area on Lake Superior
1228K 1:24000 quadrangle: San Francisco North, CA, illustrated at left
1K Sample path for use with the San Francisco North map
1847K 1:24000 quadrangle: Palo Alto, CA, with much variety and detail
1333K 1:100000 half-degree-square: Long Island Sound near Block Island
79K 1:2000000 State of Delaware
494K 1:2000000 State of Indiana, with public land survey system
880K National Atlas plate outlining Urban Areas

Getting Data from the USGS

USGS digital data is available from the EROS Data Center in Sioux Falls. DLG files in SDTS form are available on line; select large or small scale SDTS format. See detailed instructions on how to download USGS data and prepare it for dlgvu.

Coverage is incomplete and is best at the smallest (least detailed) scales. 1:2000000 scale maps are available for all states but Alaska. At 1:100000 scale, the hydrography (water) and transportation layers are complete for those forty-nine states, but other layers are incomplete. 1:24000 scale quadrangle maps are available only for some areas, and in many of those only some layers are present.

Using DLGVU on Microsoft Windows

We don't normally use Windows, but we did verify dlgvu under Windows 2000, noting a few drawing glitches and other infelicities. You will need Icon for Windows and the latest Icon program library if you'd like to try this yourself. We are not able to provide support for dlgvu under Windows.


The United States Census Bureau also publishes vector maps. Their data can be viewed using the Icon TIGER package.

Icon home page
dlgvu was written by Gregg Townsend and Will Evans.
E-mail: gmt@cs.arizona.edu and will@cs.arizona.edu.