The basic purpose of this code is to make acceptably accurate projected versions of the topographic databases without having to resort to a GIS package. You are prompted for the database you desire (TOPO30 or ETOPO5) and the projection parameters necessary for an Albers Equal Area Conic projection, namely the two standard parallels (which generally should be about 1/6 of the way from the top and bottom of the map) and the origin, where the longitude of the origin should be the center of your map (the latitude isn't too important). The code uses the 1866 Clarke spheroid for North America. For maps of the entire U.S., the USGS uses standard parallels of 29.5 and 45.5 degrees and an origin of 0 latitude and -95 longitude. Although the use of the Clarke spheroid is incorrect for other parts of the world, the error is not too significant.
You also provide the latitude and longitude of opposite corners of the map. You are then asked if you wish to fill the entire rectangle or use the lat/lon boundaries as input. The first option will make a solid bitmap, complete as the original database allows, where the two corners specified will have the lat and lon as input; the latitude and longitude of the other 2 corners will be output to the screen. If you choose the swath (using the latitude and longitude bounds as input), then the output map will include all the terrain within your bounds and will have "no data" values (=-9999 for TOPO30 and -19999 for ETOPO5) for the points on the bitmap outside your lat/lon range (this happens because the meridians are no longer parallel in the projected map).
You also specify the number of pixels wide you wish the bitmap to be. Your ability to use the bitmap is limited by the space your computer might have; for best results anticipate using the output at a scale of 300 dots per inch and multiply accordingly. The code itself can handle output bitmaps up to about 500000 points wide, which should be much, much wider than anything you want. You will be told the height of the resulting bitmap in pixels--this is an important number. The size of the bitmap is also included in the default output file name; if you leave this appended to the name, Spyglass Transform will correctly infer the size of your file when you read it into that code (this is also a handy way of keeping some record of the size of the bitmap).
Output from the program is a binary file consisting of 2-byte integers going from left to right and then top to bottom over the area of your map. These integers are elevations in meters above sea level. There are three modes to this program: spot reprojection, averaging reprojection, and interpolating reprojection. You will be prompted for one of these modes after entering all the parameters needed to describe your map. In general, your map will look best if you just answer "yes" to the question ("Do you want to average?" or "Do you want to interpolate?"). In some instances, particularly if the resulting output file is to be used for purposes other than making a display map, you might wish to use a different option.
Return to C.H. Jones home page
Craig Jones, cjones@mantle.colorado.edu