HDF File Label and Description [message #22031] |
Tue, 17 October 2000 00:00  |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
I have been working with some ISCCP data in the HDF-SDS format and I am
unable to find a HDF routine that gets to the file label and desciption
part of these files. There are some text data located here I want to get
to - namely the date of the data. I have no problems getting to the 12
Data Sets in the file.
Any suggestion? Liam's tools and Fanning tools don't appear to see the
file label and description information.
Kelly Dean
CSU/CIRA
|
|
|
Re: HDF File Label and Description [message #22145 is a reply to message #22031] |
Thu, 19 October 2000 00:00  |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
Thanks Leon,
Your HDF_AN_TEST gets what I want....
1 4 12 0
File_Label:ISCCP-D1 Year 1985 Month 01 Day 01
Kelly
Leon Majewski wrote:
> On Wed, 18 Oct 2000 14:50:55 -0600, Kelly Dean <krdean@lamar.colostate.edu> wrote:
>
>> However, the HDF_BROWSER from IDL 5.3 returned these file labels and
>> descriptions as "AN". Unfortunetly, the HDF_BROWSER is a SAV and I am unable
>> to see how they do it. Time to open up those manuals.
>>
>> Kelly
>
> When you are using the HDF_BROWSER function what output does it return and secondly which
> part do you want to access?
> ie
> a = HDF_BROWSER(filename)
> help, a, /structure
>
> is the info you want in
> help, /structure, a.an
>
> if so... then i think this might get you going in the right direction.
>
> first off, i've never looked at the an section before - i only use sd bits
> secondly, im using 5.2 - i don't know if hdf has changed though (still ver 4?)
> that said
>
> PRO HDF_AN_TEST
>
> path = 'c:\my documents\leon\data\chl\'
> Filename = path + 'test.hdf'
>
> MY_FILE_ID = HDF_OPEN(Filename)
> MY_AN_ID = HDF_AN_START(MY_FILE_ID)
>
> Result = HDF_AN_FILEINFO(MY_AN_ID, nfl, nfd, ndl, nds)
> if Result eq 0 then begin
> print, nfl, nfd, ndl, nds
>
> ;annot types see HDF_AN_SELECT
> ;annot_type = 2 (file labels)
> my_annot_type = 2
>
> ;index see HDF_AN_SELECT
> my_index = 0
>
> ann_id = HDF_AN_SELECT(an_id, my_index, my_annot_type)
>
> if ann_id ne -1 then begin
>
> Result = HDF_AN_READANN(ann_id, my_file_annot)
> if Result ne -1 then begin
> print, 'File_Label:',my_file_annot
> endif else print,'AN failure 2'
>
> endif else print,'AN failure 1'
>
> endif else print,'AN failure 0'
> HDF_AN_ENDACCESS, Result
> HDF_CLOSE, MY_FILE_ID
> END
>
> -------------------------
> Leon Majewski
>
> Remote Sensing & Satellite Research Group
> Curtin University of Technology, Perth, Australia
>
> email: majewski@ses.curtin.edu.au
|
|
|
Re: HDF File Label and Description [message #22150 is a reply to message #22031] |
Thu, 19 October 2000 00:00  |
majewski
Messages: 15 Registered: March 2000
|
Junior Member |
|
|
On Wed, 18 Oct 2000 14:50:55 -0600, Kelly Dean <krdean@lamar.colostate.edu> wrote:
> However, the HDF_BROWSER from IDL 5.3 returned these file labels and
> descriptions as "AN". Unfortunetly, the HDF_BROWSER is a SAV and I am unable
> to see how they do it. Time to open up those manuals.
>
> Kelly
When you are using the HDF_BROWSER function what output does it return and secondly which
part do you want to access?
ie
a = HDF_BROWSER(filename)
help, a, /structure
is the info you want in
help, /structure, a.an
if so... then i think this might get you going in the right direction.
first off, i've never looked at the an section before - i only use sd bits
secondly, im using 5.2 - i don't know if hdf has changed though (still ver 4?)
that said
PRO HDF_AN_TEST
path = 'c:\my documents\leon\data\chl\'
Filename = path + 'test.hdf'
MY_FILE_ID = HDF_OPEN(Filename)
MY_AN_ID = HDF_AN_START(MY_FILE_ID)
Result = HDF_AN_FILEINFO(MY_AN_ID, nfl, nfd, ndl, nds)
if Result eq 0 then begin
print, nfl, nfd, ndl, nds
;annot types see HDF_AN_SELECT
;annot_type = 2 (file labels)
my_annot_type = 2
;index see HDF_AN_SELECT
my_index = 0
ann_id = HDF_AN_SELECT(an_id, my_index, my_annot_type)
if ann_id ne -1 then begin
Result = HDF_AN_READANN(ann_id, my_file_annot)
if Result ne -1 then begin
print, 'File_Label:',my_file_annot
endif else print,'AN failure 2'
endif else print,'AN failure 1'
endif else print,'AN failure 0'
HDF_AN_ENDACCESS, Result
HDF_CLOSE, MY_FILE_ID
END
-------------------------
Leon Majewski
Remote Sensing & Satellite Research Group
Curtin University of Technology, Perth, Australia
email: majewski@ses.curtin.edu.au
|
|
|
Re: HDF File Label and Description [message #22160 is a reply to message #22031] |
Wed, 18 October 2000 00:00  |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
I am afriad I do not.
The file is a HDF-SD file and I can get to the data with the DFSD_GETINFO and
DFSD_GETDATA ( obsolete routines ).
However, the HDF_BROWSER from IDL 5.3 returned these file labels and
descriptions as "AN". Unfortunetly, the HDF_BROWSER is a SAV and I am unable
to see how they do it. Time to open up those manuals.
Kelly
Liam Gumley wrote:
> Kelly,
>
> Do you know what kind of HDF object is used to store the label and
> description (e.g. SDS, Vdata etc.)?
>
> Cheers,
> Liam.
>
> Kelly Dean wrote:
>
>> I have been working with some ISCCP data in the HDF-SDS format and I am
>> unable to find a HDF routine that gets to the file label and desciption
>> part of these files. There are some text data located here I want to get
>> to - namely the date of the data. I have no problems getting to the 12
>> Data Sets in the file.
>>
>> Any suggestion? Liam's tools and Fanning tools don't appear to see the
>> file label and description information.
>>
>> Kelly Dean
>> CSU/CIRA
|
|
|