
/****************************************************************
*                                                               *
* dem2rad.c	version 0.2					*
* (type dem2rad help for usage)                                 *
*                                                               *
* This program converts a Digital Elevation Models (DEM) file   *
*   to a coordinate file that the gensurf command of Radiance   *
*   can utilize.                                                *
*   --- coordinate triplets                                     *
*								*
* This program is written particularly for 7.5' dem files       *
*    and I didn't bother to look into the 1-degree dem file     *
*    format enough to tell if it will work for that.  At least  *
*    it will give you warning messages (if you don't give the   *
*    -m switch).                                                *
*								*
* The only 7.5' elevation data that will work are the files     *
*    saved as old-style DEMs. The new-style SDTS files now      *
*    available for most of the US at the URL below will not     *
*    work. There are some old-style 7.5' DEMs at:		*
*    ftp://spectrum.xerox.com/pub/map/dem/			*
*								*
* It now works for 1-degree DEMs, found for the entire US at    *
*    http://edcwww.cr.usgs.gov/doc/edchome/ndcdb/ndcdb.html     *
*                                                               *
* Author : Gilbert Leung    gleung@athena.mit.edu               *
*   modified from the program demex.c                           *
*   (Author : Robert Smyser?)                                   *
*   ---fixed quite a few of fortran i/o bugs                    *
* Other modifications by Mark Stock, 1998-05-05, include:       *
*     -ANSI C compliance (not complete, enough to run)          *
*     -changed RECLEN from 1024 to 1025 b/c scanf behavior      *
*     -added some more debugging output to stderr               *
*     -added subsampling option                                 *
*     -added centering option                                   *
*     -added vertical exaggeration                              *
*     -allowed reading of the header (no file writing)          *
*     -fixed problem with incomplete columns                    *
*     -longitudinal scaling automatic on 1-degree DEMs          *
*                                                               *
* Any questions or comments, please e-mail mstock@umich.edu     *
*                                                               *
*****************************************************************/

Mark Stock, 1998-05-05

You want to know how to compile this. So here you are:
At the Unix prompt in the directory containing all the files, type

make

And dem2rad will (hopefully) be built. This code has been tested
on SGI IRIX 6.3 and Red Hat Linux 4.2. 

All code written by Mark Stock is in the public domain, and can be
freely used and modified. All code written by the previous authors
can be assumed to be controlled under their authority. 

DISCLAIMERS: 

This program will not convert every DEM to a Radiance-
readable format, only those for which it was written. This 
includes all Continental US 1-degree DEMs, and most 7.5' DEMs.

This program comes with no warranty or guarantee of performance,
you are using it at your own risk.

