Building the Matrix

The Matrix Builder is the tool that matches each record in the inventory to the stand dynamics you have defined using the ForestModel XML. It is the Matrix Builder that creates all of the necessary input files of the Patchworks data model. The Matrix Builder can be found in the Application Launcher in the Data Prep folder.

  1. In the Application Launcher, select Matrix Builder from the list and click on "Go"

  2. Click on next in the first dialog box.

  3. Select the input files:

    XML input file: QuickTourIII/tracks/C5.xml

    Fragment dataset: QuickTourIII/data/fragments.shp

Figure 168. Input Files Required for Matrix Builder

  1. Select the folder that will hold the data model files generated by the Matrix Builder:

    Output directory: QuickTourIII/tracks

Figure 169. Select the output folder

  1. Click on Finish to start the building process.

At this point, a window will pop up inviting you to "validate input fields". This is another chance to change any of the input elements in the xml file. We already did this in step 2. of the section called “Customizing the Forest Model”, so our xml file already matches our fragments file. We can click on "cancel" or "finish" in this window. The next window which invites us to "validate defined columns" is another opportunity to change any of the define columns in the xml file. We don't need to make any changes here, so click on "finish" or "cancel". These two pop up windows eliminate the need to edit the xml file directly in a text editor.

Figure 170. The Matrix Builder

The Matrix Builder window provides a progress bar along the top, a list of folders containing mismatched records on the left and detailed information as to the nature of the error in the right most window. The Matrix Builder progresses through the fragments file record by record to find growth and yield information, habitat and sucession rules, treatment options and retention factors. Whenever it encounters a record that does not match any of the combinations outlined in the XML file it is placed in the list with original strata combinations that did not match.

You've done such a great job that we don't have any Build Errors. All of our CSV files that make up the data model are now contained in the tracks folder. To learn more about these files and how they relate to one another see The Patchworks data model.


If you do have Matrix builder errors or mismatches, they should be resolved before continuing with the data set preparations, as those mismatched records will produce blocks with no attributes. The Matrix Builder also contains a Table Viewer with the original inventory records, and a read-only version of your Forest Model file. This allows you to investigate the build errors that occur within the Matrix Builder. More information on dealing with Matrix Builder errors can be found in the section called “Matrix Builder Questions”.