[Back to Interface] [Prev]

SDwritedata/sfwdata/sfwcdata

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

sds_id IN:

Data set identifier returned by SDcreate or SDselect

start IN:

Array specifying the starting location of the data to be written

stride IN:

Array specifying the number of values to skip along each dimension

edge IN:

Array specifying the number of values to be written along each dimension

buffer IN:

Buffer for the values to be written

Purpose

Writes a subsample of data to a data set or to a coordinate variable.

Return value

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

Description

SDwritedata writes the specified subsample of data to the data set or coordinate variable identified by the parameter sds_id. The data is written from the buffer buffer. The subsample is defined by the parameters start, stride and edge.

The array start specifies the starting position from where the subsample will be written. Valid values of each element in the array start are from 0 to the size of the corresponding dimension of the data set - 1. The dimension sizes are returned by SDgetinfo.

The array edge specifies the number of values to write along each data set dimension.

The array stride specifies the writing pattern along each dimension. For example, if one of the elements of the array stride is 1, then every element along the corresponding dimension of the data set will be written. If one of the elements of the array stride is 2, then every other element along the corresponding dimension of the data set will be written, and so on. Specifying stride value of NULL in the C interface or setting all values of the array stride to 1 in either interface specifies the contiguous writing of data. If all values in the array stride are set to 0, SDwritedata returns FAIL (or -1).

When writing data to a chunked data set using SDwritedata, consideration should be given to be issues presented in the section on chunking in Chapter 3 of the HDF User's Manual, titled 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; sfwdata and sfwcdata. The sfwdata routine writes numeric data and sfwcdata writes character scientific data.

FORTRAN

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

integer sds_id

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

<valid numeric data type> buffer(*)

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

integer sds_id

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

character*(*) buffer(*)



[Back to Interface] [Prev]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.