[Top] [Prev] [Next] [Bottom]

SDreaddata/sfrdata/sfrcdata

intn SDreaddata(int32 sds_id, int32 start[], int32 stride[], int32 edge[], VOIDP buffer)
sds_id

IN:

Dataset identifier returned from SDselect

start

IN:

Array specifying the starting location

stride

IN:

Array specifying the number of values to skip along each dimension

edge

IN:

Array specifying the number of values to read along each dimension

buffer

OUT:

Buffer for the data

Purpose

Reads a hyperslab of data from a dataset.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

The start array specifies the multi-dimensional index of the starting corner of the hyperslab to read. The values are zero-based.

The edge array specifies the number of values to read along each dimension of the hyperslab.

The stride array allows for sub-sampling along each dimension. If a stride value is specified for a dimension, that many values will be skipped over when reading along that dimension. Specifying stride = NULL in the C interface or stride = 1 in either interface specifies contiguous reading of data. If the stride values are set to 0, SDreaddata returns FAIL (or -1). No matter what stride value is provided, data is always placed contiguously in buffer.

If the SDS specified by sds_id contains no data, SDreaddata returns 0.

When reading data from a "chunked" SDS using SDreaddata, consideration should be given to be issues presented in the section on chunking in Chapter 3 of the HDF User's Manual, tited Scientific Data Sets (SD API) and Chapter 13 of the HDF User's Manual, titled HDF Performance Issues.

Note that there are two Fortran-77 versions of this routine: sfrdata and sfrcdata. The sfrdata routine reads numeric scientific data and sfrcdata reads character scientific data.

FORTRAN

integer function sfrdata(sds_id, start, stride, edge, buffer)

integer sds_id, start(*), stride(*), edge(*)

<valid numeric data> buffer(*)

integer function sfrcdata(sds_id, start, stride, edge, buffer)

integer sds_id, start(*), stride(*), edge(*)

character* (*) buffer



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.