Generally the simple PutRow routine is used for this type of data. When writing "timestamped data" (using the "BeginTimestampedSegment","PutTimestampedSegment", or "PutRow" routines) rows are added one row at a time.
#IDL FLTARR FULL#
If the segment was full but the data contains more rows than will fit in the segment, the data will be truncated to the number of rows that will fit. An error will be returned if the segment was already full. The latter case will store multiple rows in one call. If, for example, BeginSegment was called with initialData being a 32-bit integer array of then PutSegment could only be called with a data array which is a 32-bit integer array of either or. The data array must match in data type and shape as was specified in the BeginSegment call. Use -1 for the rowidx to store rows sequentially. The rowidx argument specifies the offset in the segment to begin storing the data. Once the segment has been initialized with the BeginSegment call, data can be added using the PutSegment call. If the initialData was a single dimension array then the number of rows would be the size of the array and each row would consist of a scalar value. Subsequent segments may contain more rows but the shape of each row must match the first segment.
![idl fltarr idl fltarr](https://www.irya.unam.mx/computo/sites/manuales/IDL/Content/GuideMe/images/laplacian_negative.gif)
For example if initialData was an array then the segment would contain 300 rows where each row is 100x200. The last dimension in the array specifies the number of "rows" in the segment. The initialData argument also sets the shape of the data array in the segment. The initialData array will specify the data type of the values for all segments.
![idl fltarr idl fltarr](https://www.l3harrisgeospatial.com/docs/html/images/ncdf01.gif)
Idx values greater than or equal to the total number of segments stored for this node will be rejected. If you need to go back and overwrite segments you can specify an idx greated than -1 to indicate which segment you are overwriting. Normally you would call this with idx=-1 which will continue to append segments each time this routine is called. When writing "normal segments" (using the "BeginSegment","PutSegment" routines) you must first call BeginSegment to reserve space for the segment, to initialize the data and to define the start time, end time and dimension definition for the segment. There are matching TDI helper functions for most of these entry points. Int status= TreePutRow(int nid, int bufsize, _int64 *timestamp, struct descriptor_a *rowdata) Int status= TreePutTimestampedSegment(int nid, _int64 * timestamp, struct descriptor_a * rowdata) Int status= TreeBeginTimestampedSegment(int nid, struct descriptor_a * initialValue, int idx)
#IDL FLTARR UPDATE#
Update the start, end and dimension info for a segment Int status= TreeUpdateSegment(int nid, struct descriptor * start, struct descriptor * end, struct descriptor * dim, int idx)
![idl fltarr idl fltarr](https://s2.studylib.net/store/data/013009053_1-d596f9034687304a08bd88b435f48829.png)
Int status= TreePutSegment(int nid, int rowidx, struct descriptor_a * data) Int status= TreeBeginSegment(int nid, struct descriptor * start, struct descriptor * end, struct descriptor * dim, struct descriptor_a * initialData, int idx) The process of storing segmented data is essentially stateless in the sense that it would be possible for a program to begin storing segmented data and then exit and then another program could be run to continue writing data to the same node. The time stamps are stored as a 64-bit unsigned integer value. In both types of segmented records, each segment is indexed by a start time and end time. Each row consists of a set of data values and a corresponding time stamp. This type of data is stored one row at a time and a segment is completed when a application specific number of rows have been recorded. The second type is designed for measurements that are obtained one time stamp at a time. Each segment consists of a data block and a dimension description describing the time base for the segment. Using a double buffering scheme a buffer of data can be stored in a segment while the next buffer is being recorded. The first type is designed for storing data from transient recorders where many time slices are buffered by the recorder. There are currently two types of segmented records.