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:
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
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.
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 WindowsWe 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.
TIGER MapsThe 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: firstname.lastname@example.org and email@example.com.