Using the Group Fragments Tool

  1. First, access the Group Fragments tool from the Application Launcher under the Data Prep folder and click 'Go'.

  2. The first pane asks you to supply the name of the inventory (fragment) file and the unique polygon identifier.

    • Fragment data set: QuickTourIII/data/fragments.shp

    • Unique fragment identifier: FRAGS_ID

Figure 150. Locating fragments to group

  1. Input the name of the topology file and distance threshold. This is the file that we created in the step above. This is the maximum distance the Group Fragments Tool will search for candidate polygons to group together (a separation of more than 20m is too far for fragments to be grouped together even if they have identical criteria).

    • Topology file: QuickTourIII/tracks/topology_fragments.csv

    • Distance threshold: 20

Figure 151. Topology Calculation

  1. Next, input a reselect expression describing eligibility of fragments. Although a complicated reselect expression can be input here we recommend building a single field in your inventory file which denotes eligibility of the stand for inclusion in the model. This field can then be used in the reselect expression. In this example only polygons that have an associated yield curve (THEME2) will be included in the analysis.

    Reselect: THEME2 ne 'N'

Figure 152. Fragment eligibility criteria

  1. Select one or more stratification columns which will only allow grouping if the values are the same. This example uses 7 stratification fields (see Table 3, “Fields required by the group fragments tool”). Select all 7 by clicking and holding the Ctrl button down while making your selections.

    • THEME1

    • THEME2

    • THEME4

    • THEME5

    • VQO_CODE

    • LMU_AB


Figure 153. Stratfication columns

  1. Input the columns in the fragment file that denote area and age (see Table 3, “Fields required by the group fragments tool”). We have divided the area by 10,000 so that the area in the blocks file will be represented by hectares, since the area in the fragments file represents m2.



Figure 154. Fragment attributes

  1. Other blocking parameters such as culmination volume, average fragment elevation and trafficabilty can be added here however in this example we will use the default values that automatically appear.

Figure 155. Blocking parameters

  1. Finally, input target block size and trivial polygon size.

    Target block size:50

    Trivial polygon size:1

The target block size represents the average operational size block you would like to see in the model. Keep in mind a block is the smallest spatial unit in Patchworks. The trivial polygon size represents the maximum threshold size of a stand that could be added to a block that is already above the target size. This will reduce the amount of small fragments left on their own that are not an appropriate operational size (in hectares).

Figure 156. Block size target

  1. Upon hitting "Finish", the following window will appear:

Figure 157. The Group Fragments Window

In this 'Map Viewer' interface, there are a range of parameters that can be adjusted to control the grouping behaviour. The results of the grouping can be viewed dynamically. Of special interest is the "Age tolerance" which may be edited here. The default has been set to "0", we will change this to an age tolerance of "0", so that stands of different ages may not be grouped together.

  1. Click in the "Age tolerance" box and type in "0".

Since we are now happy with the parameters, we will start the blocking.

  1. Click on the Start the blocker button on the toolbar to start the blocking process.

At the bottom of the map viewer, you will see a histogram of the fragments. Green represents candidate fragments, blue represents merged fragments,and red, unmergable fragments. Before starting the blocker, most fragments were green, or candidate fragments. Notice that since you have started the blocker, the histogram has changed from green to blue, or merged fragments.

To determine when the blocking process is complete you need to consult the windows command processor window. In the windows command processor window, you can see the blocker stabilize when the count reaches a consistent value. At this point, you can pause the blocker.

  1. Click the Pause button on the Map Viewer toolbar.

To investigate in further detail the how's and why's of how your fragments were grouped you can click on the "Reports" tab of the Group Fragments window. You will find two reports: "Block area and frequency by strata" and "Fragment area and frequency by strata". These two CSV files detail the mergebility of each of your fragments and blocks.

For a visual investigation you can click on the Legend tab and select the "Random Block Colours" layer and click on its corresponding table to look at the data for each. You will see that ten attributes have been appended onto the fragments file. These all start with an underscore character, and are described below:

Table 4. Diagnostic fields generated by the Group Fragments Tool

_CLUSTER_The cluster (block) number that the fragment has been grouped into
_AREA_The area in hectares of the fragment
_VOLUME_The volume of the fragment (based on the Culmination Volume you inputed in the last dialog box of the Group Fragments tool)
_ELEVATION_Average fragment elevation (inputed in the last dialog box of the Group Fragments tool)
_FLOWAREA_The culmination of area for each fragment based on wood forwarding direction
_FLOWVOLUME_Volume forwarded from each fragment (_FLOWAREA_x Culmination Volume)
_TOTALAREA_The total area of the block of which the fragment is a member
_TOTALVOLUME_The total volume of the block of which the fragment is a member
_STATUS_The merge status of the fragment: either candidate, merged, or unmergable

Lastly, you can also zoom into a small section of your map to see the red arrows illustrating the direction wood flows from one fragment to another. You will have to zoom in to quite a small area to see the fragment polygon boundaries again. Follow the instructions below:

  1. Select the Legends tab again.

  2. Make the "Forwarding Direction" layer active by clicking on it so that the border appears raised.

  3. Using the Zoom in button on the toolbar, click and drag to create a small box in the map viewer.

Figure 158. Forwarding direction

With the Group Fragments Tool paused you are able to investigate the resulting groupings and determine if this is acceptable. However, you may adjust any of the parameters and continue grouping to find a new configuration by clicking the Start button again. You can 'Reset Fragments' and start from scratch with new parameters as well.

Once you are happy with the configuration you must pause and save the results. The result of the Group Fragments Tool is a lookup table in CSV format. This file will contain two columns, your fragment-id and the new corresponding "cluster" or block id. In a GIS tool this file can then be used to join to the original fragments and dissolve a simplified block shapefile that can be loaded into the model.

  1. To save the lookup file, click on "Save the current grouping to a file" in the toolbar.

  2. Then supply a filename to represent your lookup file.


  3. In your GIS tool of choice open:

    • QuickTourIII/data/fragments.shp

    • QuickTourIII/blocks/block_lookup.csv

  4. Add a field to the fragments shape file called BLOCK. Join the block_lookup.csv to the fragments.shp using the FRAGMENTS to FRAGS_ID.

  5. Calculate the BLOCK field to equal the CLUSTER field from the lookup file.

  6. Dissolve a new shapefile on the BLOCK field but only for those stands that have been grouped into blocks.

    Reselect:BLOCK ne 0

    Save the new block shape file:QuickTourIII/blocks/blocks.shp

We now have the spatial foundation for our Patchworks model of the Crowsnest Pass. The new unique block labels will be used as the starting point for the model and will be used to link to the aspatial stand dynamic information used by the model. Let's keep going!