comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » HDF_SD_ADDDATA problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
HDF_SD_ADDDATA problem [message #59951] Mon, 21 April 2008 16:24 Go to previous message
adfraser is currently offline  adfraser
Messages: 9
Registered: April 2008
Junior Member
Dear Everyone,

I'm having trouble writing to an HDF file using HDF_SD_ADDDATA, but
let me set the scene quickly first.

I'm using a multispectral satellite imagery dataset in its native L1B
(HDF-EOS, it's MODIS for those who care!) format. When ordering the
data, one has the option to channel subset the data to reduce size.

I've written IDL programs to cloud mask the data, which involves
manipulating an SDS within the HDF. My programs all work fine using
the full, un-subsetted data, but whenever I try them on the subsetted
HDFs, they fall over with this error.

------------------------------------------------------------ -----------
% HDF_SD_ADDDATA: Unable to write the specified HDF-SD slice.
% Execution halted at: HDFEDITSDS 28 /array/work/adfraser/
MODIS
images/18_4_08 processing of winter2 data/output/HDFeditSDS.pro
% $MAIN$
------------------------------------------------------------ -----------

Here is the code which I've been using to write successfully to the
unsubsetted data but unsuccessfully to the subsetted data:

------------------------------------------------------------ ------------
PRO HDFeditSDS, filename, sdsname, newdata

sdfileid=hdf_sd_start(filename, /rdwr)

; Find the index of the "Gridded Data" SDS.
index = HDF_SD_NAMETOINDEX(sdFileID, sdsname)

; Select the Gridded Data SDS.
thisSdsID = HDF_SD_SELECT(sdFileID, index)

HDF_SD_AddData, thisSdsID, newdata

hdf_sd_end, sdfileid

END
------------------------------------------------------------ -------------


I've checked all the obvously stupid things (file access permissions
are identical, and the SDS name exists within the HDF). I'm at a loss,
please help!

Cheers,
Alex.


Alex Fraser
Ph.D. candidate
University of Tasmania
Antarctic Climate and Ecosystems Cooperative Research Centre
Sandy Bay Campus
Tasmania 7001
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL plotting query - how can I get rid of unwanted colour for a particular data value???
Next Topic: Multiple draw widget events

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:20:32 PDT 2025

Total time taken to generate the page: 0.80231 seconds