Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > HDF_SD_ADDDATA ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 20 Topic 5658 of 5728
Post > Topic >>

HDF_SD_ADDDATA problem

by adfraser@[EMAIL PROTECTED] Apr 21, 2008 at 04:24 PM

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




 20 Posts in Topic:
HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-21 16:24:17 
Re: HDF_SD_ADDDATA problem
"brodzik@[EMAIL PROT  2008-04-22 07:23:38 
Re: HDF_SD_ADDDATA problem
"brodzik@[EMAIL PROT  2008-04-22 07:25:50 
Re: HDF_SD_ADDDATA problem
UV_Catastrophe <bripma  2008-04-22 13:57:56 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-23 19:17:22 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-23 19:18:31 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-23 19:23:27 
Re: HDF_SD_ADDDATA problem
jameskuyper@[EMAIL PROTEC  2008-04-24 06:00:58 
Re: HDF_SD_ADDDATA problem
"brodzik@[EMAIL PROT  2008-04-24 07:25:39 
Re: HDF_SD_ADDDATA problem
jameskuyper@[EMAIL PROTEC  2008-04-25 09:15:05 
Re: HDF_SD_ADDDATA problem
liamgumley@[EMAIL PROTECT  2008-04-25 09:18:25 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-27 18:05:57 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-27 18:08:32 
Re: HDF_SD_ADDDATA problem
James Kuyper <jameskuy  2008-04-28 02:52:31 
Re: HDF_SD_ADDDATA problem
jameskuyper@[EMAIL PROTEC  2008-04-28 16:07:27 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-29 22:57:17 
Re: HDF_SD_ADDDATA problem
James Kuyper <jameskuy  2008-04-30 11:13:39 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-04-29 23:43:34 
Re: HDF_SD_ADDDATA problem
James Kuyper <jameskuy  2008-04-30 11:20:11 
Re: HDF_SD_ADDDATA problem
adfraser@[EMAIL PROTECTED  2008-05-01 19:05:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun May 11 19:37:58 CDT 2008.