ul icon ur icon
This page updated: August, 2002

Digital Terrain Mapping DTM

DTM HTF form:

Processing a .dem file into a .htf is required for use in Digital Terrain Mapping. The DEM page processes dem(s) into .bit file(s) and the Dem Db List form processes a database of dem files into a .tpcfg. A single dem can be processed without intermediate conversion into a .bit and the .tpcfg file used for processing the .bit(s). Some knowledge of the file is required to fill in the HTF page of the HTF Pack form. This information is normally gleaned from the dem during processing into a .bit/.tpcfg and then loaded into the form when the .tpcfg is opened for processing. Following are examples for: entering 1 file w/o a .tpcfg, "DTM .tpcfg how to" is an explanation/example of a 1 file .tpcfg, a "complicated" .tpcfg walk-though, "building" is a walk-through step by step of entering multiple files w/o a ready made .tpcfg. dtm htf form: .bt
The area to the right of the text "HTF output" contains the Drive \ Directory \ filename of the htf file to be MADE (the file should not exist yet and has a .htf extension)
The area to the right of the text "WorldSize" contains the X Width (Total) of the data
then to the right of the text "x" Y Height (Total) of the data
then to the right of the text "Tile Size" (usually 128 or 256.. should ALWAYS be smaller than the Height or width, and a multiple of 2^ : 16, 32, 64, 128, 256, 512) (Tiles are the divisions of the htf into smaller parts)
then to the right of the text "Default height" the default value used for filling blank spaces (what this is depends on the data and if it was processed into a .bit)
then to the right of the text "DEMPath" the Drive \ Directory \ location of the actual data file(s) to be converted (Directory location Not the file name(s))
Note that the "HTF output" and "DEMPath" areas have buttons [...] that may be used to locate the files (except the htf file does not exist yet so another file may be selected and then the name changed)
Beneath this area are 4 "columns" that have to be filled/selected for each file to be compiled into the .htf.
If "DEMPath" is valid then clicking in the area beneath "File Name" will create a drop down box containing the files in the "DEMPath" directory (If it is not a valid directory then make it so).
"World Offset" normally is 0,0 for a single file
"Size" is a conjugated "WorldSize" in text format for a single file, else it is the size of THIS file.
"Data Type" is a drop down box offering the available data types: Select the one defining the dem file data. (normally either Intel or not for integers) ( or single for floating point data) (Conversion of dem files into .bit on the DEM page handles other data types...)
16 bits (Intel)
16 bits (non-Intel)
VTP BT (single)
bit 32 (single)
bit 16 (Intel)
After all the blanks are filled in press the World link button or [HTF][Process] menu item to process the file into a .htf (or Save it as a .tpcfg).

DTM .tpcfg how to
.tpcfg files contain the information to process 1..many dem files into 1 compressed HTF file. Examples exist for Etopo5, Etopo2, Gtopo30, and Globe: the standard government global data sets. All data represent the same "area" per cell per HTF tpcfg (square pixels - in designated format: Degrees or Distance or ?).
The simplest example is the ETOPO5 file which covers the world as 1 file : TerrainBase/ETOPO5, from the NOAA National Data Center/NGDC (18 MB uncompressed). http://www.ngdc.noaa.gov/seg/fliers/se-1104.shtml
There are 6 lines in a .tpcfg (although the 6th line may be VERY long).
HTFName=F:\HTF\tbase.htf
WorldSizeX=4320
WorldSizeY=2160
TileSize=128
DefaultZ=0
DEMPath=F:\dems
DEMs="tbase.bin,""0,0"",4320x2160,""16 bits (Intel)"""

dtm htf form: etopo
After loading the file into HTF Pack the data will be displayed prior to processing. Verify that the data is correctly placed into the space after the=: (the "File Name" can get confused if processing many .tpcfg's ... simply click the area and it should "revert" to the correct file name, else select the correct file name...)
HTFName=contains the Drive \ Directory \ filename of the htf file to be MADE (the file should not exist yet)
WorldSizeX=X Width (Total) of the data
WorldSizeY=Y Height (Total) of the data
TileSize= (usually 128 or 256.. should ALWAYS be smaller than the Height or width, and a multiple of 2^ 16, 32, 64, 128, 256)
DefaultZ= the default value used for filling blank spaces
DEMPath= This line may be very long... repeating values per each input file to be processed. For Etopo5 and Etopo2 it is only 1 set of values as all data is in 1 file.
GTOPO and GLOBE (287 MB compressed, expands to 1.7GB) contain several files of different x,y sizes, however they are not overlapping nor missing areas (other than the oceans- but values are there.. just all the same) (its the old missing - blank - 0 - designated hitter paradigm)
Make a copy of the etopo5.tpcfg, gtopo.tpcfg, and globe.tpcfg files; change the extension to .txt; double click them to open, then print to compare - evaluate - learn (especially the gtopo<>globe file sizes)... then change the extension back to use them.

dtm htf form: USA

DTM .tpcfg ... a little more complicated
the .tpcfg file for the USA 1 degree dems is a little more complicated, and 24k dems should probably be divided into areas for processing (I suggest 1 degree groups of 64 cells). (Better yet is the current srtm 1AS demo data 1 degree cells). The 250k dem htf file is over 1 gig and a 24k htf would be ~64 times that size! It took 10 hours to process the 250k dems ((935 files) 2.5 gig of .bit data preprocessed from ~10 gig of ascii .dem files) into a ~1 gig .htf on my 400 Mhz computer. HTF files take only milliseconds to view which is the amazing reason to learn-do all this.
Note: the following .tpcfg has linefeeds in the 6th line for ease of comparison... there are no linefeeds in line 6 of the actual .tpcfg file. {sundry comments added}. Note that the line has NO , at the END either. Each 'set of values' is: filename; X,Y start place for this file; X,Y size of this file; type of data; ?always empty""?.
HTFName=E:\HTF\bin250.htf
WorldSizeX=72001
WorldSizeY=31201
TileSize=128
DefaultZ=-32767
DEMPath=E:\dems\dem 250\Bins\
DEMs=
{for this tpcfg the first tile is NOT at 0,0}
"kenora-w.bin,""36000,0"",1201x1201,""bin 16 (Intel)""",
{for dems 1201 points have 1 point overlap H and V}
"kenora-e.bin,""37200,0"",1201x1201,""bin 16 (Intel)""",
{the next 'line' of dems, start 1 tile in}
"cape_flattery-e.bin,""1200,1200"",1201x1201,""bin 16 (Intel)""",
{the next tile in line}
"victoria-w.bin,""2400,1200"",1201x1201,""bin 16 (Intel)""",
...
{the last tile in line}
"thunder_bay-e.bin,""44400,1200"",1201x1201,""bin 16 (Intel)""",
{the next 'line' of dems, also start 1 tile in}
"copalis_beach-e.bin,""1200,2400"",1201x1201,""bin 16 (Intel)""",
"seattle-w.bin,""2400,2400"",1201x1201,""bin 16 (Intel)""",
...
{some time later, the last in a line}
"fort_pierce-e.bin,""54000,26400"",1201x1201,""bin 16 (Intel)""",
{next line, starts WAY in}
"mc_allen-w.bin,""31200,27600"",1201x1201,""bin 16 (Intel)""",
"mc_allen-e.bin,""32400,27600"",1201x1201,""bin 16 (Intel)""",
"port_isabel-w.bin,""33600,27600"",1201x1201,""bin 16 (Intel)""",
{and skips some tiles}
"charlotte_harbor-e.bin,""51600,27600"",1201x1201,""bin 16 (Intel)""",
"west_palm_beach-w.bin,""52800,27600"",1201x1201,""bin 16 (Intel)""",
"west_palm_beach-e.bin,""54000,27600"",1201x1201,""bin 16 (Intel)""",
{next line, starts WAY in too}
"brownsville-w.bin,""33600,28800"",1201x1201,""bin 16 (Intel)""",
{skips over to Florida}
"miami-w.bin,""52800,28800"",1201x1201,""bin 16 (Intel)""",
"miami-e.bin,""54000,28800"",1201x1201,""bin 16 (Intel)""",
{last line, starts at Florida}
"key_west-w.bin,""52800,30000"",1201x1201,""bin 16 (Intel)""",
{last tile of last line: NO , at end}
"key_west-e.bin,""54000,30000"",1201x1201,""bin 16 (Intel)"""
Note that 30000 + 1201 = WorldSizeY=31201; the X Width widest part was near the top of the HTF. All the files-tiles lose 1 point from being overlapped by the next, except the last tiles point.

dtm htf building

DTM .tpcfg ???:

ll icon lr icon
Copyright © 1991..2002 by Ivan Lee Herring