Calling make_dem without arguments will show the command line syntax:
prompt> make_dem
Usage: make_dem <xml input file>
The make_dem utility is controlled entirely through the supplied XML input file. The following screen grab shows a complete example of such a file:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE make_dem SYSTEM "http://www.dirsig.org/dtds/make_dem.dtd">
<make_dem infile="nadir.cfg" outfile="sample.dem" format="ascii">
<grid>
<deltax>1.0</deltax>
<deltay>1.0</deltay>
<extent>
<lowercorner>
<location spatialunits="meters"><x>0.0</x><y>0.0</y></location>
</lowercorner>
<xboxes>1000</xboxes>
<yboxes>1000</yboxes>
</extent>
</grid>
</make_dem>
The example shows where a Document Type Definition (DTD) can be found. This can be used to validate the syntax of XML configuration files.
The ``infile'' specifies a DIRSIG configuration file for the scene. Note that the sensor and tasking information in this file is ignored; it is simply used to extract path and scene information. The ``outfile'' specifies where the generated DEM is to be placed. The ``format'' specifier may be either ``ascii'' or ``envi'', and controls the type of output generated.
The ``deltax'' and ``deltay'' indicate the spacing in meters between DEM samples.
The ``lowercorner'' in the ``extent'' section indicates the smallest (x,y) coordinate associated with the DEM. The ``xboxes'' and ``yboxes'' indicate the number of samples in each dimension. In the sample XML input above, the lower corner is (0,0); the last sample will be generated at (999,999).
The above XML input was applied to the ``urban'' scene which comes with the DIRSIG distribution:
prompt> make_dem sample.xml
The following screen grab shows the contents of the generated ``sample.dem'':
0 0 -1.79769e+308
0 1 -1.79769e+308
0 2 -1.79769e+308
... ... ...
... ... ...
... ... ...
... ... ...
27 402 155.448
27 403 155.448
27 404 155.448
... ... ...
... ... ...
... ... ...
... ... ...
999 997 130.201
999 998 130.102
999 999 130.003
Note that the first three lines have ``-1.79769e+308'' as the height. This indicates that there was no geometry at scene coordinates (0.0,0.0).