The first data in the .stnd file populates several
fields of the stnd variable. These fields comprise the
header of the .stnd file:
| Never | Data | Field | Purpose |
| Used | Type | Name | |
| int | nCols | The number of columns in the .stnd file. | |
| int | nRows | The number of rows in the .stnd file. | |
| int | xllCorner | The x-component of the south-west corner. | |
| int | yllCorner | The y-component of the south-west corner. | |
| int | cellSize | The width and height of each grid. The value is often 30. | |
| int | noDataVal | The value used to represent ``No Data'' |
The remainder of the .stnd file contains stand identifiers in
a DEM_ROW
DEM_COL matrix. As each stand identifier is
read from the file, this parser determines if there is an entry
in the stands array for this stand identifier already. If so,
that entry's num_grids integer counter is incremented. If
not, an entry in the stands array is created, the id for
that entry is set to the stand identifier read from the file and the
num_grids integer counter becomes 1. Thus, for each stand
identifier, there is exactly one entry in the stands array
for that stand identifier.
After the entries are created for each stand identifier and the count of the number of times each stand identifier is found in the .stnd file is set in the num_grids field, the data read from the .slf file then flows into the corresponding entries of the stands array.
At this point, the only field in the stands array that has not yet been created is the tree_array_p field. This field is set in the gen_tree_list function that is called when the trees are drawn to the screen, when the information dialog box is displayed (see Section 4.1.10) or when texture mapping is performed.