|
Purpose
|
Reads a subsample of data from a data set or coordinate variable. |
|
Return value
|
Returns SUCCEED (or 0) if successful or if the data set or coordinate variable contains no data and FAIL (or -1) otherwise. |
|
Description
|
SDreaddata reads the specified subsample of data from the data set or coordinate variable identified by the parameter sds_id. The read data is stored in 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 read. 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 read along each data set dimension. |
|
|
The array stride specifies the reading 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 read. 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 read, 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 reading of data. If all values in the array stride are set to 0, SDreaddata returns FAIL (or -1). No matter what stride value is provided, data is always placed contiguously in the buffer. |
|
|
When reading data from a "chunked" data set using SDreaddata, consideration should be given to the 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; sfrdata and sfrcdata. The sfrdata routine reads numeric scientific data and sfrcdata reads character scientific data. |