DEMTOTGA v0.9
          convert .DEM  to .TGA height-field for POV raytracer.

Written by Vahur Krouverk vahur@fv.aetec.ee
Based on DEM2POV  v1.1c by W. D. Kirby.



This program converts  Digital Elevation Model (DEM) file into a
height-field .TGA file for use in the POVRay raytracer.

Requirements: 32-bit Windows (Win95, WinNT)


USAGE:

demtotga [-h headerfile] dem_file tga_file


-h headerfile specifies headerfile (.HDR) for .DEM file. If it is not specified,
then following values are assumed by default:
NROWS               6000
NCOLS               4800
NODATA             -9999


Program asks following parameters during working:
Start column
End column
Start row
End row
These values specify area, which should be converted to .TGA file.
To avoid tedious typing, user could create input file for these values and 
provide it to the program. 
E.g. to cut out rectangle (1,1)-(100,200), input file with following contents 
should be created ( let's name it INPUT):
1
100
1
200

and start program as follows:
demtotga e0000.dem hf.tga <INPUT >out

NOTES:
Program converts data 1:1, i.e. for each data value in .DEM file accords one
pixel in the .TGA file. This approach does not take into account proportion or
projection and therefore additional transformation (scaling, shearing) may be 
needed in PovRay for acceptable results.

Program uses normalization of data: it determines minimum and maximum value
within user selected area and re-scales data to obtain maximum resolution.

Documentation for .DEM files could be found at 
http://edcwww.cr.usgs.gov/landdaac/gtopo30/README.html

DISCLAIMER:

No copyright / no royalties / no guarantees / no problem.
This software is public domain and may be distributed freely.
Source code is available on request.

