Re: reading HDF with HDF_SD_START() [message #56137] |
Mon, 08 October 2007 00:06 |
fanxing_gis
Messages: 8 Registered: August 2007
|
Junior Member |
|
|
On 10 8 , 11 57 , David Fanning <n...@dfanning.com> wrote:
> fanxing_...@163.com writes:
>> i'm sorry to state the occasion when the error listed above occurs.I
>> write a programme to view the HDF data structue including scientific
>> data set,global attributes and attributes of SD.To do that i start a
>> new IDL session and open the HDF file with hdf_sd_stat(),it worked
>> well, all the SDs were listed in widget_list using hdf_get_info(),here
>> i click each of the SDS the attributes or the information of the SDS
>> could be showed in a text widget, at the beginning it is run well,but
>> repeat the process several times the programme was halted and the
>> error message is printed:
>
>> HDF_SD_START: Unable to start the HDF-SD interface.
>> Execution halted at: $MAIN$
>> in the same session i write the follow code in command line,and the
>> same error message printed as above.
>
>> IDL> a=dialog_pickfile()
>> IDL> hdfid=hdf_sd_start(a)
>> after that,i try the fileinfo() function, it's worked well,the result
>> is as follows:
>> ** Structure <11534e0>, 7 tags, length=36, data length=36, refs=1:
>> NAME STRING 'D:\AST_09T_003080820010402180000000.hdf'
>> EXIST LONG 1
>> READ LONG 1
>> WRITE LONG 1
>> HDF LONG 1
>> NETCDF LONG 0
>> SIZE LONG 14324417
>> if i describe that clearly ,i hope you kind guys could help me
>
> Well, here is my guess. I think the variable you are
> passing to HDF_SD_START in your widget program is not
> what you think it is. But this is only a guess. I do
> think the chances of it being a programming error is
> the most likely probability. I'd start checking *all*
> your assumptions.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")- -
>
> - -
thanks David,the problem has been solved,and the reason is just what
you think,a programming error resulting from unclosing the HDF file
cursorily ,so the SD interface handle were used up.
|
|
|
Re: reading HDF with HDF_SD_START() [message #56138 is a reply to message #56137] |
Sun, 07 October 2007 20:57  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
fanxing_gis@163.com writes:
> i'm sorry to state the occasion when the error listed above occurs.I
> write a programme to view the HDF data structue including scientific
> data set,global attributes and attributes of SD.To do that i start a
> new IDL session and open the HDF file with hdf_sd_stat(),it worked
> well, all the SDs were listed in widget_list using hdf_get_info(),here
> i click each of the SDS the attributes or the information of the SDS
> could be showed in a text widget, at the beginning it is run well,but
> repeat the process several times the programme was halted and the
> error message is printed:
>
> HDF_SD_START: Unable to start the HDF-SD interface.
> Execution halted at: $MAIN$
> in the same session i write the follow code in command line,and the
> same error message printed as above.
>
> IDL> a=dialog_pickfile()
> IDL> hdfid=hdf_sd_start(a)
> after that,i try the fileinfo() function, it's worked well,the result
> is as follows:
> ** Structure <11534e0>, 7 tags, length=36, data length=36, refs=1:
> NAME STRING 'D:\AST_09T_003080820010402180000000.hdf'
> EXIST LONG 1
> READ LONG 1
> WRITE LONG 1
> HDF LONG 1
> NETCDF LONG 0
> SIZE LONG 14324417
> if i describe that clearly ,i hope you kind guys could help me
Well, here is my guess. I think the variable you are
passing to HDF_SD_START in your widget program is not
what you think it is. But this is only a guess. I do
think the chances of it being a programming error is
the most likely probability. I'd start checking *all*
your assumptions.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: reading HDF with HDF_SD_START() [message #56139 is a reply to message #56138] |
Sun, 07 October 2007 20:33  |
fanxing_gis
Messages: 8 Registered: August 2007
|
Junior Member |
|
|
On 10 8 , 9 49 , David Fanning <n...@dfanning.com> wrote:
> fanxing_...@163.com writes:
>> i want to process image data using IDL,so the first step is to
>> read the data, the format of my data is in HDF, the code i writed as
>> follows:
>> IDL> a=dialog_pickfile()
>> IDL> hdfid=hdf_sd_start(a)
>> unluckily i encounter the error, the message is:
>
>> HDF_SD_START: Unable to start the HDF-SD interface.
>> Execution halted at: $MAIN$
>> what's wrong with it? please help me or give me some hints about this
>> problem!
>
> You may find this article to be of interest:
>
> http://www.dfanning.com/fileio_tips/nohdf.html
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
thank you,David
i'm sorry to state the occasion when the error listed above occurs.I
write a programme to view the HDF data structue including scientific
data set,global attributes and attributes of SD.To do that i start a
new IDL session and open the HDF file with hdf_sd_stat(),it worked
well, all the SDs were listed in widget_list using hdf_get_info(),here
i click each of the SDS the attributes or the information of the SDS
could be showed in a text widget, at the beginning it is run well,but
repeat the process several times the programme was halted and the
error message is printed:
HDF_SD_START: Unable to start the HDF-SD interface.
Execution halted at: $MAIN$
in the same session i write the follow code in command line,and the
same error message printed as above.
IDL> a=dialog_pickfile()
IDL> hdfid=hdf_sd_start(a)
after that,i try the fileinfo() function, it's worked well,the result
is as follows:
** Structure <11534e0>, 7 tags, length=36, data length=36, refs=1:
NAME STRING 'D:\AST_09T_003080820010402180000000.hdf'
EXIST LONG 1
READ LONG 1
WRITE LONG 1
HDF LONG 1
NETCDF LONG 0
SIZE LONG 14324417
if i describe that clearly ,i hope you kind guys could help me
thanks
|
|
|
Re: reading HDF with HDF_SD_START() [message #56140 is a reply to message #56139] |
Sun, 07 October 2007 18:49  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
fanxing_gis@163.com writes:
> i want to process image data using IDL,so the first step is to
> read the data, the format of my data is in HDF, the code i writed as
> follows:
> IDL> a=dialog_pickfile()
> IDL> hdfid=hdf_sd_start(a)
> unluckily i encounter the error, the message is:
>
> HDF_SD_START: Unable to start the HDF-SD interface.
> Execution halted at: $MAIN$
> what's wrong with it? please help me or give me some hints about this
> problem!
You may find this article to be of interest:
http://www.dfanning.com/fileio_tips/nohdf.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|