Subject: Re: HDF -- r/w slabs

From: Doug Ilg <[email-masked]>
Date: Tue, 20 Feb 1996 16:53:11 -0500

Joel Parriott wrote:
> 
> Question1:  sfwdata(sds_id, start, stride, edges, zrho)...do the
> start, stride and edges vectors refer to SDS array or to my input data
> array (zrho)?  I would hope that they refer to the data array, and that
> things are written to the SDS contiguously.  Does the same thing apply for
> reading back from an SDS to a large array?

It's the other way around.  HDF assumes that your buffer contains contiguous
data and uses the start/stride/edge vectors to scatter data around your SDS.  On
reading, it's the same thing in reverse.  That is, HDF will gather data from
widely scattered places in your SDS and assemble them into a contiguous buffer,
which you must provide.

> Question2:  Does a pointer to the SDS write/read location advance so that
> I can make multiple writes to an SDS...just changing the data array from
> say zrho-->zpressure....or will I overwrite?  Perhaps I would need to add
> another dimension to my SDS for each data array I want to grab values from...

There is no read/write pointer to an SDS.  Each operation performs direct access
to the SDS based on the values supplied in start/stride/edge.  If you want to
march through the SDS, adding data as you go, just increment your start vector
appropriately.

====================================================================
Doug Ilg                                      Hughes STX Corporation
EOSDIS Standard Data Formats          7701 Greenbelt Road, Suite 400
[email-masked]                     Greenbelt, MD  20770  USA
Voice: (301) 441-4089                            FAX: (301) 441-1853
================= I do not speak for HSTX or NASA ==================