Lately I've been rendering the U.S.G.S. Digital Elevation Model (DEM) data set, 7.5 minute quadrangles, in the ray-tracing program, POV-Ray. I would like to use Mathematica to read and parse these DEM files, which are text files. The data is in the form of lists of elevations, expressed in (integer) meters, and located every 30 meters along rows (east and west) and columns (north and south). A variety of header information precedes the elevation data, including the latitudes and longitudes of the corners of the quadrangle.
A typical 7.5 minute DEM is about 1 MB in size, while the 1 degree DEMs are 9 MB in size.
Often it is desirable to merge several 7.5 minute DEMs to derive a larger landscape. For instance, a block of 9 DEMs, or 4 DEMs, or 6 DEMs, and so on. Ideally, one should be able (given that all the necessary DEMs reside on your hard disk) to specify a subset of the data (not necessarily comprising the entirety of each DEM), by entering the northeast and southwest coordinates, and then the various files would be parsed, and the lists of lists combined into one grand list of lists. Then the elevations would be converted into a mesh of triangles, and viewed using Graphics3D. They then could be exported to a POV-Ray scene file using Roman Maeder's utility, where the mesh of triangles would not only be shaded according to the specified light sources, but mountains would cast shadows, and so on.
I would enjoy the collaboration of any Mathematica programmers out there, who might be interested in digital landscapes. Please email email me if interested, and/or post messages to the group if a notebook or package already exists which reads and displays DEMs.
Russell Towle Giant Gap Press P.O. Box 141 Dutch Flat, California 95714 ------------------------------ Voice: (916) 389-2872 e-mail: firstname.lastname@example.org ------------------------------