Q:  Does HEG work on ASTER L1A?
A: No, HEG does not work with this data set. The ASTER L1B data is very similar and adequate enough for most users purposes as far as we can tell. If there is legitimate need for the ASTER L1A, let us know and we'll consider supporting it.

Q:  When I try to open up my data set. I get the following error message in a pop up window:

Can not load
Error: unknown error

What does this mean? What can I do?
A: It almost always means that the data set is not supported. Generally, users are trying to open up a "pure" HDF data set which is not HDF-EOS.

Q:  I downloaded HEG for windows (hegWINv2.12_32.zip or hegWINv2.12_64.zip) and followed the instructions for installation. When I try to run HEGTool.bat, I see a DOS command window a fraction of a second, and it immediately disappears. Nothing happens. I have JDK 1.6 installed. What the problem can be?
A: It looks like that your Java submits an error and immediately closes DOS window not allowing you to see the error. To see what the error is open a command line window (DOS window) first. In that window change the directory to the one where the HEGTool.bat is. Run HEGTool.bat on command line. This time the DOS window should not disappear and let you see the error. The problem can be as simple as having wrong file paths in the HEGTool.bat file, which can be fixed by editing this file and correcting it. Other problems may be resolved easily once you know the error.

Q:  How can I tell if a data set is in the HDF-EOS format?
A: Here's some things you can try:


  • See if it's in the HEG Product List
  • Use "ncdump" (See Links Page) to open the file. See if there is a GRID or SWATH Object inside. You can get "ncdump" from the HDF site at NCSA.
  • You can use a tool such as HDFView with HDF-EOS Plugins (See Links Page) to look inside the data set and see if GRID or SWATH Objects exist. If they don't, then the data set is not in HDF-EOS format.
  • Contact us and we can help you determine the format of data set you are looking at.

Q:  I get the following error message:

Exception in thread "main" java.lang.NoClassDefFoundError: heg/HEGDriver

A: This means that the HEG startup script can not find your HEG.jar file. Look inside the HEG script (small ascii file in your bin directory) and check the path to your HEG.jar file which is in the same directory as the HEG script.

Q:  I get the following types of error messages:

HEG: /bin/java/java: cannot execute
or
./HEG: line 18: java: command not found

What's the problem?
A: Your JAVA path is not specified correctly. Look inside the HEG script (small ascii file in your bin directory) and check the path to the JAVA virtual machine (Java executable).

Q:  I'm getting some of the Java error messages above, but I'm on a Windows machine and I don't see a HEG script?
A: On Windows, it's called the "HEGTool.bat" script. It's in the ../HEG/HEG_Win/bin subdirectory of where you installed HEG. Check this script to see that it was created correctly. You can also use your Windows search tool to find the "HEGTool.bat" file.

Q:  What's the HEG script look like?
A: If you're on a Unix platform, it will look like this:

===================================================================
#!/bin/sh

# ****************************************
# * HEG                                  *
# * Shell script for running the HEG GUI *
# ****************************************

MRTDATADIR=/ecs/formal/HEG/data
export MRTDATADIR

PGSHOME=/ecs/formal/HEG/TOOLKIT_MTD
export PGSHOME

HEGUSER=Sharon
export HEGUSER

# Run the MRT Java GUI.
#java -DHEGUSER=Sharon -classpath $HOME/heg/bin/HEG.jar heg.HEGDriver
/tools/java4/java1.4/bin/java -DHEGUSER=Sharon -classpath /ecs/formal/HEG/bin/HEG.jar heg.HEGDriver
===================================================================


If you're on a Windows platform, it will look like this:

===================================================================
@echo off

rem     *****************
rem     *    heg.bat    *
rem     *****************

rem Set the MRTDATADIR environmental var to the HEG data directory.

set MRTDATADIR=c:\cygwin\home\cpradera\heg\HEG\HEG_Win\data

set MRTBINDIR=c:\cygwin\home\cpradera\heg\HEG\HEG_Win\bin

set PGSHOME=c:\cygwin\home\cpradera\heg\HEG\HEG_Win\TOOLKIT_MTD

set HEGUSER=CIDP

rem Run the Java GUI.
rem Change the java.exe path to reflect the directory structure on your machine.
rem Quotes are only necessary to handle blank spaces in the pathnames.

"c:\j2sdk1.4.2_07\bin\java.exe" -DHEGUSER=CIDP 
-classpath "c:\cygwin\home\cpradera\heg\HEG\HEG_Win\bin\HEG.jar" heg.HEGDriver ===================================================================

Q:  How can I edit the HEGTool.bat file in Windows?
A: You might be asking this because MS Word does not seem to work. You can use an ascii text editor such as NotePad.
(Isn't there an ascii mode for MS Word? ;-))

Q:  I have an image file in HDF format produced by another program. Can I convert it to GeoTIFF by using HEG?
A: No, since it's not in HDF-EOS format. Some other programs can produce HDF-EOS data sets. There is a good chance these can be imported into HEG. But if it's not in HDF-EOS format, it won't work. (HEG could be modified to read specific HDF files, but this development direction would have to be approved by management.)

Q:  I ran HEG using an HDF-EOS data set and it core dumped. What happened? I even got the data set from the DAAC and the documentation says it's in HDF-EOS format.
A: Get in touch with us and we'll check out the data set. We have found quite a few situations where minor deviations from the HDF-EOS format specification caused a problem. Anotherwords, something is a little off with the data set itself. A recent example is where the corner points of the GRID were specified in Degree Decimal (DD), but they should have been in Degree/Minute/Second (DDDMMMSSS.SSS) format. Once we find out about this situation, we can have a workaround in our code. HEG has many of these. This is one reason why it's hard for Proprietary GIS software companies to support HDF-EOS 100%.

Q:  I just downloaded and installed HEG 2.7 for Windows, but when I try to open a MODIS Calibrated Radiances 5-Min L1B granule I get this error message:

Can not load C:\HDF\MOD02HKM.A2004030.1835.004.2004031050556.hdf Error: unknown error

What can be wrong?
A: The problem may be caused because of using wrong java.exe. For example you may be using the one in c:\WINDOWS\system32 which may not be the correct executable. Set the path for java.exe in HEGTool.exe file to C:\Program Files\Java\bin (or any installed java, version 2.14 or later) and try again.

Q:  How can I get "true color" imagery from MODIS swath granules? I know bands 1, 4 and 3 are used for this, but when they are selected for compositing the colors are wildly skewed.
A: The traditional way to work with this problem is to load the three images into GIS software (i.e. ENVI, etc) and then stretch the data in each of the images you produce. Usually at one end of the data range, there is a value that is very big or very small relative to the bulk of most data values. These extreme values will skew the image color selection for the pixels if it is done automatically. But, you can control this manually with GIS software.

Q:  I was able to successfully export AMSR-E SWE data into GEOTIFF. However, during converting data HEG gave me the following messages:

Started writing Metadata to output hdf and/or *.met file .......
Could not find TimeofDay attribute in input hdf file.
Could not find CalendarDate attribute in input hdf file.
Could not find PlatformShortName attribute in input hdf file.
Could not find InstrumentShortName attribute in input hdf file.
Could not find first SENSORNAME attribute in input hdf file.
Could not find first POINTINGANGLE attribute in input hdf file.
Could not find first SETTINGTIMEOFPOINTING attribute in input hdf file.
Could not find second SENSORNAME attribute in input hdf file.
Could not find second POINTINGANGLE attribute in input hdf file.
Could not find second SETTINGTIMEOFPOINTING attribute in input hdf file.
Could not find third SENSORNAME attribute in input hdf file.
Could not find third POINTINGANGLE attribute in input hdf file.
Could not find third SETTINGTIMEOFPOINTING attribute in input hdf file.
Could not find MAPORIENTATIONANGLE attribute in input hdf file.
Could not find third SOLARDIRECTION attribute in input hdf file.
Some of the Mandatory metadata were not set.
Finished writing Metadata to output hdf file.

Is anything wrong with the conversion?
A: What you have got are not errors. They are just warnings. When HEG tries to write metadata to the output it first searches the input file (metadata) for some specific attributes. If an attribute is not found HEG issues a warning like one of those that you have indicated. These messages can be treated as warnings that the attributes mentioned in the message will not have values in the external *.met or embedded metadata of the output. Other than that nothing is wrong with the output.

Q:  I am having problem with converting an AIRS product that I believe you are supporting. The file that I am trying is:

"AIRS.2006.09.23.010.L2.SUBX2RET.v4.0.9.0.G20060925100330_00006275.hdf"

A: The reason that you're having problems with this AIRS data set is because it is a slightly new type of product from the NASA DAACs which is presently not supported by HEG. It is a "subsetted" product which can be determined from the "SUB" part in the name of the granule (in the "SUBX2RET" part). In this product the mapping between data fields and Lat/Lon fields has not been defined explicitly, and because of that HEG is failing. One thing you can try is to order the "AIRX2RET" data (non-subsetted) and HEG should be ok.

Q:  I am trying to use resample.exe on the command line (DOS window), but keep   getting the following fatal error from the start:

"Error: GetBeginAndEndLocs : Memory Allocation  Failed"


": Unable to allocate bufptr memory (errval =  -4)"

Resample works fine from the GUI, but I want to process a number of files, hence looking at the command line version. I am running WinXP Professional.
A: The error message indicated seems to be parameter file related. Usually when parameter file ends without a blank line, or lines end with MS DOS carriage-return linefeed (symbolically represented by "^M "), this error occurs. This happens if you edit your parameter file using say wordpad tool, or something similar in Windows. If you had edited your parameter file please make sure that it ends with a blank line. Also if you have edited your parameter file in windows platform, then you may need to make sure that MS DOS carriage-return linefeed does not exist in your parameter file. If it is presenet then you need to get rid of them somehow in your parameter file.

A few tools:
1. In Unix or Linux use vi, emace or Xemacs for file editing.
2. Edit in Windows (say with wordpad), then run "dos2unix" on your parameter file in linux.
3. A user claimed that he has used hex editor ( http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm) in windows to fix the parameter file.

Q:  How can I send you the data set I am having problems with?
A: Contact us to see how we can do that.
Send us email (i.e. heg-support@earthdata.nasa.gov).

  • No labels