[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Landsat 7 HDF Data
- Subject: Re: Landsat 7 HDF Data
- From: Phillip David <phillip_david(at)xontech.com>
- Date: Thu, 22 Jun 2000 15:46:36 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: WebUseNet Corp http://www.usenetserver.com - Home of the fastest NNTP servers on the Net.
- References: <8cbpqh$o12$1@nnrp1.deja.com> <8ck83d$8s$1@news.uit.no> <8dd11p$d8u$1@nnrp1.deja.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:20041
wcapehar@my-deja.com wrote:
> "Tony Bauna" <tony.bauna@tss.no> wrote:
> > <wcapehar@my-deja.com> wrote:
> > > A fishing expedition:
> > > Has anyone here tried to use ENVI and IDL (with and without
> > > the GUIs) to crack open one of the new Landsat7 ETM+ image
> > > products (in the HDF format)?
...
> > However, you can display the individual bands. They are simple
> > 8-bit binary files. The image size can be picked up from the
> > HDF reader in ENVI.
> That's what we did too. However, there is another way -- move all
> the CD contents to a harddrive and rename the "index" hdf file. ENVI
> wants to leap into that *.hdf suffix no matter what you call it when
> it comes time to input the image. We confirmed this from EDC and
> through trail and error here. Hopefully the next version will get it.
We've been going through similar problems using external files in HDF.
The basic problem is that IDL's support of HDF is primarily designed to
allow you to access data all contained in the HDF file. If some of the
data is in an external data file, that data is only accessible if you
start IDL from within the directory containing that external data. This
makes it something of a pain to deal with this type of data.
To ease the pain of this, I wrote a little routine called
SwitchHDFFile. We've established a directory naming convention, and by
parsing the HDF file name, we can determine the name of the directory
for the external data. Our convention creates a subdirectory using the
same name as the HDF file, but without the .hdf extension. All our
binary files go there. SwitchHDFFile simply parses the HDF file name
returned by dialog_pickfile, strips off the trailing '.hdf', traps
errors, then CD's to that directory. If there is no external directory,
the supposition is that all data is contained in the HDF file, and there
is no need to change directories to get at external data.
Since I don't have your data, I don't know if any such convention has
been established for your data. In addition, my code is in a classified
work area, so I can't pass that along. However, I hope the idea helps.
Phillip