The most basic and interesting geographical data type is the digital elevation model (DEM). A Digital Elevation Model is an ASCII or binary file that contains only spatial elevation data in a regular gridded pattern in raster format. The traditional source for United States DEM data has been the USGS Geographic Data Download . This source has changed considerably within the last year, however, and the situation is somewhat confusing. This site no longer offers the most important DEM dataset: the 1:24,000 SDTS 30m and 10m Digital Elevation Models. These are available for free from gisdatadepot.com and from adti-us.com, which are commercial sites but which offer this and other data for free. The USGS offers effectively the same data but in a different format called the USGS Seamless Data Distribution (NED). After years of unsuccessfully pushing SDTS as the new scientific file format standard, the USGS has abandoned it and offers NED data under two simpler formats. The supposed advantage of the NED is its user interface. However, experienced users will find it cumbersome.
These extremely useful data sets allow the generation of 3D renderings of any location within the United States. The one shown to the right corresponds to the USGS Topo map for Salem, NY shown above. A feel for the character of the terrain can be more directly obtained by inspection of this type of image than by looking at conventional "flat" maps. As will be shown, 3D models rendered from DEM data can be extremely useful and versatile.
The generation of 3D renderings from Digital Elevation Model data by the method outlined here, while not difficult, requires a certain level of skill and art. This is becoming less of an issue with the advent of powerful new GIS applications. The images shown on this page were prepared the "old-fashioned" way, using the ray tracer POV-Ray. This is actually not a GIS application at all but is a general purpose 3-D rendering tool. It is available for free download. It is still useful because of its low-level user interface. There is virtually nothing that you cannot do with a ray-tracer like POV-Ray if you put enough effort into it. More sophisticated GIS applications allow you to do things a lot quicker, as long as what you want to do is what they offer.
In order to use POV-RAY you need to convert a DEM file in ASCII or SDTS format to an analogous TGA file whereby the color depth of each pixel is proportional to the value of the corresponding elevation posting. The resulting TGA file can be interpreted by POV-Ray (and other GIS and graphics programs) to produce a 3D rendering. I used POV-Ray to generate all the images shown in this page and in several of the following sections.
I wrote a program for conversion of DEMS to such TGAs called DEM2TGA7. This program can handle both 1:250,000 native DEMS and also 1:24,000 DEMS converted from SDTS format (see SDTS below). DEM2TGA7 will also merge two DEMs together into a single image (see sections on file merging below).
If you use DEM2TGA7 for the conversion you will get an 8-bit TGA file, which cannot be read by POV-Ray directly. You must first convert the file to a POV-Ray compatible format using a program like Paintshop Pro. (DEM2TGA7 follows the format of the original DEM2TGA program, which also produced an 8-bit/pixel
grayscale TGA file.)
I revised the program to produce POV-Ray compatible TGAs. POV-Ray requires a 24-bit Truevision TGA format with the elevation data contained only in the high order and mid order bytes. POV-Ray ignores the low byte. The TGA file is written low byte first, then mid byte, and high byte last. I call this program DEM2POV2. Don't be alarmed by the weird image that this file produces. This is an artifact of stuffing the low byte (blue) with a dummy value. If this is not done and the data is spread over three bytes POV-Ray loses the LSB.
After making the conversion, I import the resulting .TGA into the ray tracerPOV-RAY creating a height field object and render it as shown (or any other way I choose). The .TGA file used to generate the 3D rendering is shown in color below to the right.
Note that 1:250,000 scale USGS elevation data is in DEM format. The USGS is in the process of converting all of their data to the newer SDTS format. The 1:24,000 scale files have already been converted. I recently wrote two utilities for making the SDTS to TGA format transfer directly. I call the programs SDTSPOV2and SDTSTGA2. The first program converts a 7.5' SDTS DEM file to the bizarre POV-Ray version of a 24-bit Truevision TGA file. The second program converts SDTS DEMs to the 8-bit grayscale format that is used by many GIS programs. (Note that the program SDTS2DEM written by the late Sol Katz of the BLM will not handle the new SDTS format as of July 15, 2001.)
The approach outlined on this page is somewhat dated, so do not despair if it seems too complicated. The information in the following sections shows how to achieve better results quicker using some of the powerful new GIS applications mentioned above.
November, 2003: Editor's Note: At the time I wrote this article, Pov-Ray was probably the most important free software tool for the production of Digital Terrain Models. Since that time, many excellent applications have been written. The most important of these is probably 3DEM which was a commercial application at the time but is now distributed for free. In addtion, MicroDem has improved its capabilities such that it is one of the best tools for terrain modeling for fee or free, although it continues to be offered for free. These applications are covered in subsequent articles and I would encourage anyone interested in the subject to examine them closely. Pov-Ray is still a powerful tool for terrain modeling and offers virtually the same flexibity as Open GL programming with a more friendly user interface, so this application is worth looking at as well.