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
Re: HDF_SD_ADDDATA problem [message #60087 is a reply to message #59951] Thu, 01 May 2008 19:05 Go to previous messageGo to previous message
adfraser is currently offline  adfraser
Messages: 9
Registered: April 2008
Junior Member
Hello again,

Good news: I've discovered a workaround! Inexplicably, if you use
getdata to get the data and adddata to add back the data BETWEEN THE
ONE SET OF HDF_SD_START and HDF_SD_END calls, then this seems to
"unlock" the SDS, meaning you can then use the above code (HDFeditSDS)
to write to the data as normal (by normal, I mean as if it were an
unsubsetted MODIS L1B file).

Here's the code:

========================================
FUNCTION HDFunlockSDS, filename, sdsname

sdfileid=hdf_sd_start(filename, /rdwr)

index = HDF_SD_NAMETOINDEX(sdFileID, sdsname)

thisSdsID = HDF_SD_SELECT(sdFileID, index)

HDF_SD_GETDATA, thisSdsID, sds

HDF_SD_AddData, thisSdsID, sds

HDF_SD_ENDACCESS, thisSdsID

hdf_sd_end, sdfileid

return, sds

END
======================================

Any thoughts, James or anyone else? I have no idea why this works, but
it does!

Cheers,
Alex.
[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: Mon Dec 01 16:02:58 PST 2025

Total time taken to generate the page: 1.28488 seconds