Q:  I have thousands of HDF-EOS data sets I want to use with HEG. It's too time-consuming to use the GUI one at a time. What can I do?
A: You can stack many runs on the GUI's Accepted List, but for more than 5-10 runs, it's still cumbersome to open files and load up options. What you need is to run HEG on the "Commmand Line". There are quite a few users who do this and they almost always need some guidance getting started.

Q:  What do I need to start running on the "Command Line"?
A: You need 3 things to get started (trying to keep things simple for now):

a) You'll need to know which executable to use in your bin directory. (i.e. "swtif" for SWATH data sets, "resample" for GRID data sets.)

b) You'll need to create a parameter file. This is a ascii text file that is read by the executable and contains the instructions and options for HEG executable to perform.

c) You'll need to set the ENVIRONMENT VARIABLES.

Then, you can execute a command line string such as the following to run the instructions in the parameter file:

> swtif -p "parameter_file_name"

Q:  How does this run the thousands of HDF-EOS data sets?
A: The parameter file can stack up thousands of runs. Each run is a block of text with a BEGIN and END part.

Q:  How do I make a parameter file?
A: Instructions are in the HEG User's Guide, but a much easier way is to load one data set into the GUI, set your options (i.e output format, type of reprojection, field to work on, etc). Once your run is on the "Accepted List", then stack another another run in the "Accepted List". Then "save" it. This will save the parameter file. You'll be asked where to save it. Use this parameter file as a "TEMPLATE". There are simple fields such as input filename, output filename, output projection type, etc. Note how you've saved more than one run. Because of this, you'll see how more than one run can be inside a parameter file (i.e. NUM_RUN = 2 on the top line).

Q:  Is there another way of running batch job for processing thousands of HDF-EOS data sets?
A: Yes. You may also use an script for the HEG job for processing a bunch of similar files on Command line.

Q:  The parameter file has the extents (corner points) of the input data set. How can I know what these are?
A: There is a program called "hegtool" which is in the bin directory.
Set your ENVIRONMENT VARIABLES, then run it as such:

hegtool -h "name_of_data_set"

This will create an output file called HegHdr.hdr*. It will contain information about the HDF-EOS data set. This is what's used to load the information you see on the GUI. It will contain corner point extents, pixel resolution, etc.

Q:  What are the ENVIRONMENT VARIABLES that need to be set?
A: Unix users will need the following two:


Windows user's will need an extra one:


Q:  Can I run HEG oin the Command Line mode in Windows (cmd window)?
A: Yes, but generally Windows users (who don't relate well to command line usage) find it difficult. Only one person I know has tried this. Ask me if you really want to know.

Q:  I'm a Unix user and want to run on Windows. Is there an easier way?
A: Yes. Download Cygwin and this will simulate the Unix environment. There are still *.exe files to run, but Cygwin handles this.

  • No labels