[Gdal-dev] how to show the hdf file's subdataset's speacial band?

Andrey Kiselev dron at ak4719.spb.edu
Sat Nov 13 08:46:40 EST 2004


On Sat, Nov 13, 2004 at 09:16:07PM +0800, wlx wrote:
> For example, a hdf file has many subdatasets, and one subdataset may
> has many bands, and I want to view one band of the subdataset, because
> the png/jpg/gif image driver only show one or four bands of the
> subdataset as a image,and I want to view each binds of the subdataset
> from my web program.

The 2-dimensional subdatasets will be read as single band images.
3-dimensional subdatasets will be read as multiband ones. Afterwards you
can load any band using normal GDAL's API.

Yor application should have the two levels of file controls: the first
one to select a subdataset and the second one to select a band(s) within
that subdataset.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5970603  ICQ# 26871517



More information about the Gdal-dev mailing list