U.S. Geological Survey
U.S. GEOLOGICAL SURVEY BULLETIN 2103
Selected Papers in the Applied Computer Sciences 1994


CHAPTER A


Using Geographic Information, Image Processing, and Animation Systems to Visualize a Digital Terrain Flyby

By Robert G. Clark, John W. Jones, Thomas E. Ciciarelli,

(U.S. Geological Survey, Reston, VA 22092),

and Daniel F. Stanfill IV

(Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Drive, Pasadena, CA 91109-8099)


CONTENTS

Abstract
Introduction
Background
Software Integration
ARC/INFO
Khoros
Surveyor
Products
Conclusions
References

FIGURES

  1. Functions performed by each of the three software packages (12kb)

  2. Sample screen capture from Khoros showing Surveyor glyph options (30kb)

  3. Sample screen capture from Khoros showing ARC/INFO glyph option (28kb)

  4. Khoros workspace used to produce terrain flyby (153kb)

  5. STILL: Digital orthophoto quadrangle combined with a digital elevation model showing the transportation digital line graph in red and hydrography in blue (261kb)

  6. ANIMATION: Digital orthophoto quadrangle combined with a digital elevation model showing the transportation digital line graph in red and hydrography in blue (MPEG 6.5MB)


ABSTRACT

It is becoming more and more difficult to procure expensive analytical software because of decreasing Government and university funding. Therefore, this multidivision, multiagency project focused on integrating commercial software (ARC/INFOTM), free software (KhorosTM), and public software (Surveyor) to merge several U.S. Geological Survey data sets and produce terrain flybys. The merged data sets included a digital orthophoto quadrangle, a digital elevation model, and the transportation and hydrography digital line graph layers for a mountainous area in Idaho. Preprocessing of the data was performed with ARC/INFO, a geographic information system software. After merging of ARC/INFO digital orthophoto quadrangle and digital line graph images, routines constructed in Khoros produced red, green, and blue images and reformatted them for input to Surveyor. Surveyor software was then used to produce several digital orthophoto quadrangle and digital line graph terrain flybys. By integrating the three software packages, not only were the best features of each exploited but also money was saved.


INTRODUCTION

The U.S. Geological Survey (USGS) and the Jet Propulsion Laboratory (JPL) are investigating the feasibility of integrating free software (Khoros), inexpensive public software (Surveyor), and commercial software (ARC/INFO) on commonly used hardware for visualizing large earth-science data sets. Visualization can help earth scientists view their data and make new discoveries that are often difficult to detect with conventional analytical techniques.


Data sets used in scientific visualization often require preprocessing. The complexity of this preprocessing and the large size of the data sets add to the overall difficulty of the analysis. For example, the nonstandard digital orthophoto quadrangle (DOQ) file used in this project required approximately 8 megabytes of storage and can be considered a large earth-science data set. In addition, a standard DOQ having a 1-m resolution can be as large as 50 megabytes. The software used to prepare and visualize these large spatial data sets typically has to simultaneously manipulate several large working data sets. In addition to keeping costs down, the capability to handle many large spatial data sets was one of the project's reasons for selecting ARC/INFO, Khoros, and Surveyor.


BACKGROUND

Seeing the need for preprocessing large earth-science data sets prior to visualization, the National Aeronautics and Space Administration (NASA), the funding organization for Surveyor, suggested embedding Surveyor into Khoros. In an initial meeting, the JPL Surveyor authors, NASA personnel, and a USGS representative discussed Khoros' capability to perform preprocessing (for example, application of image-processing algorithms) on data prior to any of Surveyor's processing. As a result, USGS and JPL researchers performed an initial software integration so that image-processing functions could be applied to terrain data before they were loaded into Surveyor for rendering.


The Khoros visual programming environment is an image-processing system that can distribute its processing over a local-area network or a wide-area network. The JPL Surveyor system is used to generate terrain flybys. In this project, data management (for example, data importing) and some data manipulation (for example, data set gridding and regridding) were performed by an off-the-shelf commercial geographic information system (GIS) software, ARC/INFO. After the DOQ, digital elevation model (DEM), and digital line graph (DLG) images were preprocessed in ARC/INFO, Khoros was used to merge the ARC/INFO DLG (that is, roads and streams) rasterized images with the DOQ image and produce red, green, and blue (RGB) images. In turn, these preprocessed Khoros RGB images were used to construct flight paths and create animation frames in Surveyor. This process flow is illustrated in figure 1.

SOFTWARE INTEGRATION

Software integration was accomplished in two steps. The first step was to develop a shell script to convert Khoros VIFF-formatted files to JPL's Video Image Communication and Retrieval (Vicar)-formatted files and then construct Surveyor pyramid-structured databases from these Vicar-formatted files. This shell script was used as a model for the development of a "C" program (that is, a program developed in the "C" programming language). This program uses the same programs that the shell script does. By using existing programs of the JPL and the University of New Mexico, maintenance is minimized. For example, if one program was constructed to replace existing programs, it would require some reprogramming every time a file format or data type was changed, One of this project's programs made function calls to three already existing programs: one that converted Khoros VIFF-formatted files to a raw 8-bit data file, another that converted a raw 8-bit data file to a Surveyor Vicar-formatted file, and a third that constructed a Surveyor pyramid database. This "C" program also included a function to start Surveyor with a configuration file, a "worldfile" that Surveyor used to point to its pyramid database. With the generated configuration file, the user can start building a terrain flyby immediately and does not have to identify databases, load the databases, or specify initial application parameters.


The second step in the development of a Khoros-Surveyor interface involved building a Khoros glyph for the "C" program mentioned above. A glyph is a graphical representation (an icon) of a Khoros program that can be manipulated in Khoros (the facility where glyphs can be selected and operated on either individually or as a group). The Khoros glyph was developed to represent a small "C" program using the Khoros utility Composer. The resulting Khoros-Surveyor glyph is illustrated as an open glyph in figure 2.

The user specifies the Khoros input files and the Surveyor pyramid database levels. Alternatively, the input files may be specified by connecting the glyphs symbolically. A second glyph was also constructed as part of the software integration effort. This glyph, arc2viff, converted ARC/INFO raster files to Khoros VIFF-formatted files. In addition to taking the ARC/INFO raster file name as input, this second glyph required the ARC/INFO header file name associated with the ARC/INFO raster file. The header file provides the number of rows, the number of columns, and the data type of the raster file. The output file name also had to be specified. Figure 3 illustrates the open arc2viff glyph.


ARC/INFO

GIS's are robust in data management and manipulation functions such as data registering and resampling (Raper and Maguire, 1992). ARC/INFO is a widely used GIS software; the USGS has many network copies, each of which simultaneously services several users. For this project, the ARC/INFO effort was performed by the USGS's Reston GIS Research Laboratory. ARC/INFO was used to construct raster files to the same dimensions, resolution, and cell size as the DOQ. First, the DOQ was imported into ARC/INFO as an 8-bit band-interleaved-by-line (bil) file (Environmental Systems Research Institute, Inc., 1991). An ASCII header that indicated the georeferencing, cell size, and number of pixels per line for the DOQ was created with a text editor. ARC/INFO then used this information to read and reformat the DOQ to an ARC/INFO grid file (that is, an 8-bit raster file). Next, the DEM data were read into ARC/INFO by using the "demlattice" command. The gridded DEM data set originally had a 30-m resolution. The DLG layers were also imported into ARC/INFO by using the "dlgarc" command. Registration of these data sets was verified by displaying the raster (DOQ and DEM) and vector (DLG) layers simultaneously. The "linegrid" command was used to convert the DLG layers to raster files having the same resolution as the DOQ (4 m). The DEM data were resampled to the same resolution by using the grid "resample" command. After all data sets had been rasterized and resampled in ARC/INFO, the DEM and DLG data were exported as ARC/INFO bil files.


KHOROS

Khoros was selected for this project because of several important attributes: a visual programming environment, automatic generation of user interfaces, and image-processing facilities (Rasure and others, 1990). Khoros is copyrighted but is available free of charge via Internet to file transfer protocol (ftp) program anonymous users. It is used worldwide throughout the Internet community. This project used Khoros to process the ARC/INFO raster data sets into Surveyor Vicar-formatted data sets. After the ARC/INFO registered data sets were loaded into Khoros, basic data merging was performed. The three Khoros-merged RGB raster images and the DEM image were loaded into Surveyor. Figure 4 illustrates the Khoros glyphs required to perform the data merging and Surveyor initialization. This Khoros workspace was used to construct RGB images from the DOQ and the two DLG data layers. The DOQ is an 8-bit raster data set and was imported into Khoros with the arc2viff glyph. The DEM data are in a 16-bit raster file and were also imported into Khoros by using the arc2viff glyph. Several masks were built for each of the two DLG data layers (that is, transportation and hydrography) to ensure they would be correctly colored by Surveyor. The transportation layer was colored red by assigning the red channel a value of 200, the green channel a value of 0, and the blue channel a value of 0 wherever the DLG transportation data layer overlaid the DOQ. A red value of 200 was selected instead of a bright value of 255, because it would be less likely to "bleed" in various types of visualization methods. In this way, every original ARC/INFO transportation value of 2 was converted to 200 in the Khoros glyph vsubstit. The hydrography DLG data were colored blue by assigning the red channel a value of 0, the green channel a value of 0, and the blue channel a value of 200 wherever an original ARC/INFO hydrography value was 3. This procedure too was accomplished by using the Khoros glyph vsubstit. Wherever the transportation layer intersected the hydrography layer, the transportation layer took precedence, and the intersecting pixel was colored red. This order of precedence for the two DLG layers was handled primarily by the two glyphs, vand and vsub (located approximately in the center of fig. 4 ). The result of the processing of these two glyphs was used as a mask for the red channel in the subsequent vreplace glyph. The vreplace glyph applies the DLG overlays to the DOQ according to its color and color mask values. The two vor glyphs in figure 4 each combine one DLG data layer with the DOQ image. All pixels having a 0 in a DLG data layer were set to the DOQ pixel's values. A DOQ pixel has the same value for each of the RGB channels to keep the DOQ in a gray scale. The vfloor glyph constructs a black mask (that is, a zero pixel value) for the DLG data layer pixels and is used to help define the red, green, and blue colors of the two DLG data layers (Rasure and Argiro, 1991). Finally, Surveyor uses the Khoros-formatted files (that is, elevation and RGB images) as input to the Surveyor glyph located at the right side of the workspace illustrated in figure 4. Figure 5 is a view from Surveyor showing the DLG transportation layer colored in red and the hydrography layer colored in blue. The last glyph to execute, the Surveyor glyph, starts the Surveyor system.


SURVEYOR

Surveyor is one of the few terrain flyby software packages that can distribute its rendering to multiple machines. In addition, the size of the images Surveyor can process is limited only by the size of the operating system's virtual memory address space and not by array size within the Surveyor software or the size of the system swap space. To construct the DOQ flyby, the frames were rendered on five Silicon Graphics Incorporated (SGI) IRIS Indigos and two multiprocessor Sun Microsystems machines. A higher quality level for the pyramid was achieved by using an oversampling of nine rays per pixel instead of the default of two rays. The pyramid is defined as a precomputed series of reduced-resolution images scaled down from an original by user-selectable filters. The size of the output frames was set to 640×480. The frames were then converted from Vicar file format to SGI RGB file format. Once the frames were in RBG format, various products were produced for the scientific community.


PRODUCTS

Several products were created by this project. Videotapes created by using SGI's "moviemaker" application program were used as a learning tool and discussion point for further investigations. In addition, the SGI RGB-formatted frames were converted to an SGI movie format for display in the USGS Cartographic Technology Laboratory and in the USGS Technology Information Centers in Reston, Va., and Menlo Park, Calif. The SGI movies in the Technology Information Centers have an audio channel. A Moving Picture Expert Group movie was also produced. Color hard copy of several perspective views of the constructed model are displayed in the USGS Reston Scientific Visualization Laboratory. Finally, Surveyor and arc2viff glyphs are available from the authors.


CONCLUSIONS

This project demonstrated that free, low-cost public, and commercial software can be interfaced and used to visualize earth-science data. Large spatial data sets were merged and portrayed in a realistic fashion. Several products were made available to the scientific community. With these visualizations, possible inconsistencies between different types of data for a given location could be investigated. These techniques and the software developed can be applied to other spatial locations as well as to other types of data. The feasibility of visualizing earth-science data by combining the best features of several software packages residing on nonspecialized, relatively inexpensive hardware was demonstrated. This low-cost processing frees more funding for other earth-science research issues.


REFERENCES CITED

Environmental Systems Research Institute, Inc., 1990, Understanding GIS, the ARC/INFO method: Redlands, Calif., Environmental Systems Research Institute, Inc., variously paged.


Raper, J.F., and Maguire, D.J., 1992, Design models and functionality in GIS---Computers and geosciences: An International Journal, v. 18, no. 4, p. 387.


Rasure, John, and Argiro, Danielle, 1991, Khoros user's manual: Albuquerque, University of New Mexico, variously paged.


Rasure, John, Argiro, Danielle, Sauer, Tom, and Williams, Carla, 1990, Visual Language and software development environment for image processing: International Journal of Imaging Systems and Technology, v. 2, p. 183--199.



Continue to Chapter B

Return to Bulletin 2103 Contents

Return to USGS Home Page


U.S. Geological Survey, ISD National Center, Reston, VA 22092, USA
URL https://pubs.usgs.gov/bulletin/b2016/chapa/ch_a.html
Contact: webmaster@pubs.usgs.gov
Last Modified: 7/16/97 (jmw)