Important: Please see the errata section for a newly discovered flaw in the awk script provided herein. (19 December 1999)
This document is no longer being actively maintained. The current version of this tool is described here.
Unlike other resources in the Toolbox, this document doesn't provide an online solution to the problem it addresses. Rather, this document explains a process that can be performed on your local system. The document also provides Windows NT-compatible tools for performing the process.
Digital raster graphics (DRG) covering the United States are produced primarily by the United States Geological Survey (USGS). DRGs are raster images of ordinary USGS topographic maps, stored as TIFF raster files. The USGS produces DRGs of its 7.5-minute topos, its 1:100 000 scale topos, and its 1:250 000 scale topos.
DRGs for some areas of the United States are not produced by the USGS, however; they are produced by other agencies. DRGs for a large region of the southeastern U.S. are produced by the Tennessee Valley Authority (TVA).
If you use TVA-produced DRGs in GIS and mapping applications, you may already be aware that the TVA couldn't be bothered to add GeoTIFF information to its raster files like the USGS does with its DRGs. The TVA was kind enough, however, to provide world files (*.tfw) and metadata files (*.met). Many GIS applications can use the world files and/or metadata files, but some applications cannot properly georeference the DRG without GeoTIFF information included in the DRG.
This document describes a process for adding GeoTIFF information to TVA DRGs using existing public-domain tools and the world files that accompany the DRGs. A more streamlined solution could be produced with custom or commercial software, but this solution can be implemented at no cost.
The two-step process described here creates a new copy of an existing DRG by (1) using the awk utility on the world file to create a GeoTIFF input file, then (2) using the geotifcp tool to copy GeoTIFF data to the file.
This solution works only with DRGs projected on the Universal Transverse Mercator (UTM) system. The TVA also distributes another series of DRGs that have been clipped (collars removed) and projected on the Tennessee State Plane system. This solution, with the tools provided herein, is not compatible with Tennessee State Plane DRGs.
The awk script mkgtif.awk uses information from the world file to create a text file that will be used by the geotifcp program to store GeoTIFF information in a copy of the DRG. An example of the use of the awk script is as follows:
awk -f mkgtif.awk d:\data\o34087a1.tfw > o34087a1.txt
(You may need to replace awk with nawk, gawk, or another command specific to your system.)
Replace d:\data\o34087a1.tfw with the path to the appropriate world file and o34087a1.txt with a suitable filename. Be sure to retrieve mkgtif.awk to your system in order to use it.
Once the GeoTIFF input file (o34087a1.txt in the example above) has been created, use the geotifcp program to create a new DRG containing the GeoTIFF information, similar to the example below:
geotifcp -g o34087a1.txt d:\data\o34087a1.tif c:\new-drg\o34087a1.tif
Replace the example pathnames and filenames with appropriate names for your system and the DRG with which you are working. The new .tif file is ready for use with your GIS or mapping application.
You can delete the .txt file after this step if you wish.
For Windows NT systems, these public-domain tools can be used to add GeoTIFF information to TVA DRGs. Be sure to instruct your browser to save these files to disk, not attempt to run them. As with any executable program downloaded from the Internet, you should scan these files for viruses (they're clean to the best of my knowledge, but you shouldn't take my word for it).
These tools should work on Windows 95 and Windows 98 systems too, although I have not tested them on any platforms other than Windows NT.
Work is in progress to provide a Windows-based tool that will make it easier to add GeoTIFF information to TVA DRGs. This is a spare-time endeavor for me, however, and although I hope not to drag it out beyond early January 2000, I can't guarantee an availability date.
The tool will be freely distributable just like the tools listed here, and also like the tools listed here, the new tool will be limited to DRGs projected in the UTM system (Tennessee State Plane DRGs will not be supported).
An awk utility should be available on most UNIX systems. The public-domain GeoTIFF library, from which the geotifcp program can be built, can be obtained from Niles Ritter's Web site.
19 December 1999: The mkgtif.awk script contains a hard-coded value that may be inappropriate for some DRGs. The script assumes that the DRG is situated in UTM zone 16. If you need to use the tools provided here on a DRG that is georeferenced to a different UTM zone, you must change the text 16 in the string PCS_NAD27_UTM_zone_16N to reflect the appropriate zone. (For all locations in the northern hemisphere, the N suffix should be left intact.)
Last update: 19 Dec 1999 --