How to write an array into a dateset as a band, not a dateset? [message #64667] |
Fri, 09 January 2009 10:52 |
Hu
Messages: 35 Registered: January 2009
|
Member |
|
|
Hi, there
I want to write several 2-D arrays into a dateset as several ‘bands’,
not several 'datesets' in a file.
I use HDF_SD_START with keywords /CREATE to create a HDF file, and
use HDF_SD_CREATE to create a dateset in the generated file. Now I
have some (suppose 7) 2-D arrays that can be wrote into the file. What
I want is to write these 7 array into the dateset as '7 bands in one
dataset', not as 7 datesets in this file.
that is to say, if I use ENVI_FILE_QUERY to check the NB of the file,
I want the result is 7, not 1. How can I do it in IDL?
supplement to my question:
Acturally, I tried HSD_SD_ADDDATA to do this, but it can only add one
array as dataset (not as a band in a dataset).
What I want is to 'STACKING' these datesets into one dataset, and the
datasets before 'stacting' serves as "bands" after stacking.
I know how to achieve this ‘Stacking layers’ in ENVI, But how can I
finish it By IDL Programming?
thanks
|
|
|