Martin D. Adamiker's TFMAKE Version 5.0


New in TFMAKE version 5.0:

TFMAKE can now process ZIP files. Example:

TFMAKE_30METER.BAT -117.00 46.25

This downloads and extracts "http://duff.geology.washington.edu/data/raster/thirtymeter/wa75/q2365.zip" as listed in DEMLIST_30METER.TXT.

TFMAKE ZIP processing uses the following program:

UnZip 5.50 of 17 February 2002, by Info-ZIP. Maintained by C. Spieler. Send bug reports to the authors at Zip-Bugs@lists.wku.edu


New in TFMAKE version 4.0:

TFMAKE can now pass control to TruFlite 5.5 to do the rendering automatically. If this feature is to be used, the file "TRUFLITE.EXE" must be accessible to TFMAKE, e. g. by copying it into TFMAKE's folder.

In the two predefined batch files "TFMAKE_30METER.BAT" and "TFMAKE_3ARCSECOND.BAT", a new environment variable "TFMAKECOMMAND" is set.

Why?

TFMAKE looks for an environment variable "TFMAKECOMMAND". If it is present and if it has the value "final", then an additional command line is issued at the end of the image retrieval process. This command line starts TruFlite and lets it render the scenery.

Note: After rendering, TruFlite exits; you will have to load the TGA file again. This has technical reasons.


Usage:

tfmake_30meter.bat ULlong ULlat [ULavglat]

or

tfmake_30arcsecond.bat ULlong ULlat [ULavglat]

Example for a 3 arc second DEM quadrangle (San Jose West):

tfmake_30arcsecond.bat -122 38

Example for a 30 meter DEM quadrangle (Golden, CO):

tfmake_30meter.bat -105.250 39.875

Description:

TFMAKE is a set of 32 bit console programs for Windows 95, NT 4.0 (Workstation or Server) and 4.1 Server on Intel based PCs.

It only works if the file WININET.DLL (Internet access) is present in the "system" or "system32" folder of Windows. Since this file has not been shipped by Microsoft with all Windows 95 versions, you'll find it on our website http://www.truflite.com.

TFMAKE retrieves USGS 1 degree DEMs from the USGS Web server "edcftp.cr.usgs.gov" (one at a time), gets the corresponding texture information from the US Bureau of the Census Web servers "*.census.gov" and adapts these two data sources such that they fit together properly to be used by TruFlite. Even a startup scenery file is generated.

The same is being done for 30 meter DEMs (7.5 arc minute DEMs); however, the nationwide coverage of these elevation data is only approx. 50%; moreover, most of them are not publicly available. So Martin D. Adamiker's provides you with a preliminary list of 30 meter DEMs, where only a small number does have real Web URLs. California, West Virginia, Pennsylvania and Washington for example are almost completely available.

TFMAKE reduces the timespan for the texture mapping and visualization procedure from several hours to a few minutes. In fact, the only limitation is the time for downloading. You can start printing your 3D images only minutes after receiving the raw input files.

Be sure to set up the Internet connection properly, especially when you are accessing the Internet through a proxy server:

"Start Menu/Settings/Control Panel/Internet".

In general, when you're able to access Internet pages with Microsoft Internet Explorer, TFMAKE should be able to work (Netscape Navigator uses a private configuration).

The batch spawned by TFMAKE issues a success message at the end of all calculations.


Output:

Of course you can modify it as you wish including flybys with thousands of output frames.

Be sure to rename the result files "ELEVATION.TGA", "TEXTURE.TGA" and "SCENE.TRF" once you've got them. They would be overwritten by your next download.


Specifications:

File Name Style Description
tfmake_30meter.bat Batch Job Command to download and process a 30 meter DEM.
tfmake_3arcsecond.bat Batch Job Command to download and process a 3 arc second DEM.
tfmake.exe Executable The mastermind of the system. Will be called by "tfmake_30meter.bat" or "tfmake_3arcsecond.bat".
  • Gets the desired coordinates as command line parameters.
  • Looks at the environment variable "TFMAKECONFPATH" to get the name of the configuration file.
config_30meter.cfg and config_3arcsecond.cfg Configuration Files Contain the following information:
  • TMS_URLFORMAT: The URL syntax for the US Bureau of the Census Web server download. The two entries "lon=%0.1f" and "lat=%0.1f", resp., specify the placeholders for the actual coordinates.
  • TF_IMAGEWIDTH (new in v2.0): The width of the DEM in degrees (1.0 for 3 arc second DEMs and 0.125 for 30 meter DEMs).
  • TF_DEMLISTFILE: The name of the file containing the URLs.
  • TF_RECTFILE: The name of the file containing the rectification parameters.
  • TF_LOWERELEVATION: The lower limit for the elevation-to-color conversion process. Every pixel below this value (meters) gets the leftmost color of the palette file. For the States value of 0 gives the best results (if you want to map Death Valley, use -200).
  • TF_UPPERELEVATION: The upper limit for the elevation-to-color conversion process. Every pixel above this value (meters) gets the rightmost color of the palette file. For the contiguous States a value of 5000 is generally OK. For a place like Florida, however, try something between 100 and 500 instead.
  • TF_COLOROPERATOR: When merging the elevation-to-color result with the rest of the texture (streets, drainage, power lines, etc.), you have the choice to multiply pixel by pixel ("*") or to add them ("+"). The results of these two blending methods are slightly different - you will have to try out. Moreover, two bias values b1, b2 have to be specified.

Addition: x3 = x1 * b1 + x2 * b2

Multiplication: x3 = (x1 + b1) * (x2 + b2) / 255

We recommend "* 0 0" for the beginning. Should the texture file become too dark, try "* 32 32".

  • TF_VERBOSELEVEL: Level of output information during the retrieval procedure. 0 (none), 1 or 2 (full information).
demlist_30meter.txt and demlist_3arcsecond.txt DEM List Files Contain a list of all available 1 degree DEMs (as of August, 1997) and of selected 30 meter DEMs.
  • STATE: The abbreviated state name(s) the DEM belongs to. Example: "SD,ND"
  • DEM NAME: The official name of the DEM; usually the file name is made exactly corresponding to this name. Example: "ABERDEEN - E"
  • UL LONG: Longitude of the upper left corner of the top left pixel in degrees (positive for east of Greenwich, negative for west of Greenwich). Example: "-99.00"
  • UL LAT: Same as above for latitude, positive for the northern hemisphere. Example: "46.00"
  • DATE: Creation date of the DEM file. Example: "01/29/87"
  • URL1: The URL. Note that usually everything following the transfer protocol specifier ("http://") and the server name (e. g. "edcftp.cr.usgs.gov") is case sensitive.

TFMAKE only works with the following protocols:

HTTP ("http://")
FTP ("ftp://")
FILE ("file://")

NOTE: you can add your own URLs or file names to the list. Example:

"file://c:\mydems\georgia\atlanta_east_dem.gz"

rectlist_30meter.txt and rectlist_3arcsecond.txt Rectification Parameter Files Contains the corner points of the US Bureau of the Census GIF files in uncorrected and in corrected state. You will always receive these files in sinusoidal projection. TFMAKE will use values from this file to map them into a rectangular projection.
  • Lat: Latitude key. 1 degree intervals.
  • xUL: x of upper left corner - uncorrected. Will be corrected to zero.
  • yUL: y of upper left corner - uncorrected. Will be corrected to zero.
  • xUR: x of upper right corner - uncorrected. Will be corrected to Width.
  • yUR: y of upper right corner - uncorrected. Will be corrected to zero.
  • xLL: x of lower left corner - uncorrected. Will be corrected to zero.
  • yLL: y of lower left corner - uncorrected. Will be corrected to Height.
  • xLR: x of lower right corner - uncorrected. Will be corrected to Width.
  • yLR: y of lower right corner - uncorrected. Will be corrected to Height.
  • Width: width of the corrected map.
  • Height: height of the corrected map.
palette.tga Palette File Is a TGA file of arbitrary size. The topmost pixel row will be used to paint the pixels according to the elevation from the DEM file. The elevations corresponding to the leftmost and rightmost pixel are TF_LOWERELEVATION and TF_UPPERELEVATION in the configuration file, resp.
tear.exe Executable To retrieve files via the HTTP or file protocol. Called by the batch "tfmake.bat" created by "tfmake.exe".
gzip.exe Executable To expand files compressed by UNIX's gzip utility. Called by the batch "tfmake.bat" created by "tfmake.exe".
unzip.exe Executable To expand files compressed by ZIP compatible utilities. Called by the batch "tfmake.bat" created by "tfmake.exe".
dem2tga.exe Executable To convert a USGS 1 degree DEM or a 30 meter DEM (a.k.a. 7.5 minute DEM, 1 arc second DEM) into a TruFlite compatible elevation file. Called by the batch "tfmake.bat" created by "tfmake.exe".

New in v3.0:

If the corresponding texture file is 600 pixels high after the rectification (last column in RECTLIST_30METER.TXT), dem2tga assumes the input file is a 30 meter DEM and therefore calls recttga to convert the DEM from UTM coordinates to geographic coordinates.

tga2col.exe Executable To convert a TruFlite elevation file into a color file using a palette. All three files are TGA format. Called by the batch "tfmake.bat" created by "tfmake.exe".
gif2tga.exe Executable To convert a GIF file into a 24 bit uncompressed TGA file readable by TruFlite. Called by the batch "tfmake.bat" created by "tfmake.exe".
recttga.exe Executable To rectify and shrink/stretch a texture file using information from a rectification table (usually "rectlist_30meter.txt" or "rectlist_3arcsecond.txt"). Called by the batch "tfmake.bat" created by "tfmake.exe".
filecalc.exe Executable To blend two TGA files pixel by pixel. Called by the batch "tfmake.bat" created by "tfmake.exe".
writetrf.exe Executable To create a TruFlite scenery file based upon the sizes of the elevation and texture file. Called by the batch "tfmake.bat" created by "tfmake.exe".
tfmake.bat Batch Job Temporary file created by "tfmake.exe". Does all the downloading and converting.

TFMAKE - (c) 1999-2004 Martin D. Adamiker's (http://www.truflite.com) - All Rights Reserved.