You are on page 1of 6

Batch attaching a DEM to multiple NITF

images using ERDAS IMAGINE 9.3.2


Summary
Imagery delivered in NITF format with RPCs (or other delivery formats which have 3D geometric models associated
with them) generally internally reference an average terrain height to be used to provide a generally good (but often
poor) adjustment of the data to a flat plain.
However it is preferable to use a DEM if one is available since it will more accurately model the terrain distortion.
With ERDAS IMAGINE 9.3.2 or earlier this can easily be achieved for one image at a time by opening the data into
Image Info and selecting Edit | Change Map Model which will bring up a dialog asking the user to identify the
elevation file to be used (if one is not already associated).
However this approach is cumbersome if multiple NITF images need to have a DEM associated with them, so this
paper describes how to use the Batch Tool to automatically associate a DEM with multiple NITF files.
NOTE: ERDAS understands that even the procedure described below entails additional work on the part of the
customer. Consequently the next release of ERDAS IMAGINE, currently scheduled for Q4, 2009, will include a utility
to define a database of terrain information to be automatically used with 3D geometric models (and other tools which
utilize a height source), including automatic adjustment of the vertical datum.

Assumptions
This procedure assumes that a single DEM file will be associated to all of the input NITF files. Consequently you may
need to use a tool such as Mosaic Tool to create a single continuous terrain source that covers the area of the NITF
files to be processed. After mosaicing the files check that the correct Vertical Datum is still set on the file.
This procedure also assumes that the terrain source has been adjusted so that its vertical datum matches that of the
3D geometric model being utilized by the imagery. In the case of NITF this generally means that any DEMs (such as
DTED) that are measured from Mean Sea Level need to be adjusted to a vertical datum of WGS84 (which can be
achieved using Data Prep | Recalculate Elevation Values)
Note that the following procedure will, unfortunately, set a single Average Terrain Height value into the image (actually
into the .aux file, not the image itself). Consequently if you lose the connection to the DEM for any reason and the
geometric model falls back to using the Average Terrain Height then its highly likely the wrong value will be being
used. This will not be a problem if the link to the DEM remains in place, but before proceeding with applying this
procedure you should be aware of the potential problem if the DEM link is lost. If this happens you can always delete
the .aux file to revert to the original average terrain height.

Procedure
1.

From the main ERDAS IMAGINE icon panel select the Tools menu and click on Image Command Tool

2.

In the Image Commands tool select one of the NITF files that you intend to associate the DEM with

3.

Check the Set Elevation Source option and click the Options button next to it:

4.

In the Elevation Source dialog change to File, select the DEM that you wish to be used and change the
Elevation Units to the value appropriate to your DEM:

5.

In the Image Commands tool click Batch

6.

On the first page of the Batch Commands wizard change to Modify commands manually

7.

Click Next >

8.

The next page of the wizard should now look like this:

9.

You need to replace the hardwired input image name with a variable so the batch job can be applied to
multiple inputs instead. So switch to the Variables tab and click New

10. Change the name of the new variable to something appropriate such as input_name

11. Change back to the Commands tab, place the cursor in the path/filename of the input image you selected
and click the Replace current argument with variable icon and this

will become this

12. Optionally at this point you might want to click the Save icon to save this batch command to a Batch
Command File (*.bcf). This would enable you to run the same batch command on other groups of input
images at a later date (but you might wish to manually edit the DEM path and file name to something
appropriate for those files)
13. Click Next >
14. On this page you can populate a list of all the input image files which you wish to have associated with the
DEM you picked.
Click the File Chooser icon, navigate to the directory containing at least one of the images you wish to
process and select that file

15. If all the files you wish to process are in this directory simply do a multi-file select in the File tab. Otherwise
you may need to use the Multiple File Selection tab to pick files recursively in different directories or you can
open the File Chooser multiple times to add different directories-worth of files into the list of files to process:

16. Click Next >


17. On the final page you can either start processing immediately (the default) or schedule to batch process for a
later time (e.g. to run overnight)

18. Click Finish and a progress meter will show you the status of the job on each input image:

Just tagging the header with the location of the DEM to be used with teh 3D geometric model should not take
long per file so the progress should go quickly.
19. All you files should now be geometrically calibrated with a 3D geometric model that includes a pointer to a
DEM that will be used for ortho-rectification on the fly
20. Dont move or rename the DEM! If you do all your image files may revert to using the average terrain height.

You might also like