As an example, in matlab, you would call the "dted" function, and then pass the result to mat2vpt as so:
m = dted('n31.dt1'); % read in the dted file to the matrix "m" m = m(1000:end, 1:202); % select the desired subsection mat2vpt(m); % write out the matrix "m" to "geom.dat" The help for mat2vpt: usage: mat2vpt(m, fn, objname, res) Writes the matrix "m" out in CSIM's VPT format input: m The input matrix input: fn The output file name (default=geom.dat) input: objname The name of the object (default=TestObj) input: res The grid resolution of the matrixClick here to Download mat2vpt.m script. Provided by Jon Russo
The National Geospatial-Intelligence Agency (formerly the National Imagery and Mapping Agency, NIMA) produced the Digital Terrain Elevation Database (DTED) standard for storing terrain data. Its format is described in the document MIL-PRF-89020B. Each DTED file is a regular grid of elevation values. DTED level 0 has 121 x 121 data points at 30 arc second (roughly 1 kilometer) intervals. DTED level 1 has 1201 x 1201 data points at 3 arc second intervals (roughly 100 meters).
This utility converts the DTED grid into the WinFrame 3D XML format describing polygon meshes.
Additional DTED data can be downloaded from the NGA Raster Roam site at http://geoengine.nima.mil/geospatial/SW_TOOLS/NIMAMUSE/webinter/rast_roam.html
This Nov 19,'04 version includes ability to convert multiple dted tiles into one map, terrain shading based on elevation, and numerous bugfixes.
dted2wf [files] [options] [-o output]
Where: -a xmin - set viewport to be displayed (single file only) -b zmin -c xmax -d zmax -x xtrans - offset amounts for object translation -y ytrans -z ztrans -s scale - scaling factor for the terrain object -h scale - scaling factor to exaggerate elevations -q - 1/4 size output (useful for large datasets) -o output.wf - if -o is not given, output will print to screen -p - display coordinate axes -g - shade terrain with gradient relative to elevationHere a,b,c,d are the coordinates of a terrain subsection to be displayed (the viewport.) x,y,z are offset amounts for translation of the terrain object in 3D space. s is the scaling factor for the terrain object. Use -q for .25 scaling with data point interpolation for reduced file size. This is useful for large (i.e., DTED level 1) datasets. If -o and the output filename is not given, output will print to the standard output.
NOTE: When giving coordinates, 'y' is the vertical axis, while 'x' and 'z' are the horizontal axes. Distances are in meters. [files] can be a single file name, several file names, or a range of files.
% dted2wf n38.dt0 -s .01 -o n38.wf
% wf3d.exe n38.wf
Range of files:
% dted2wf dted/*/*.dt0 -s .01 -o out.wf
% wf3d.exe out.wf
Click here to Download dted2wf.tgz
(Compiled for PC Linux. Please request for other platforms.)
Provided by Tim Bieniosek
See also: WF3d