Name

select — defines eligibility for a given stratum of inventory

Synopsis

Content Model


	    <select> = features?, products?, retention?, succession ?, track?.

	    

Attributes

NameTypeDefault
statement SQL-like query string Optional

Description

The select element is the most important ForestModel element, as it is this element that provides the opportunity to construct the logic of forest dynamics and the assignment of attribute curves to forest strata. Through this process the original inventory records are assigned treatments, features, products and succession rules. A typical ForestModel uses many select statements to classify and describe complex forest dynamics. It is these select statements that provide the recipe to the Matrix Builder on how to create a clean and consistent Patchworks input dataset.

Select elements are containers for other key elements, such as features, products, succession and track. Select elements contain a statement attribute that is an SQL-like query (same as the query language used in the MapViewer and Table Viewer). The select element doesn't do anything by itself, but simply classifies the contents that apply to each input forest stand fragment. Each record in the forest inventory is tested against the select statements by evaluating the query against the polygon strata codes. If the query evaluates to a 'true' condition then the contents of the select statement (succession, feature, product, etc) will be applied to the stand.

The order of placing select statements within the Forest Model is significant. The Matrix Builder will group the contents of the select statements by type (for example all features sections are collected in a features list, and there are separate lists for products, succession, track and retention elements). The position of each section as it is found in the file is maintained in sequential order in the list of the given type. It does not matter if one type of element is defined before or after another (such as features before products) as all sections are collected into their ordered lists before the Matrix Builder processing starts.

As the Matrix Builder processes the inventory records, it will scan through the lists to find matching elements. In general when a match is found the appropriate action is applied to build out the stand dynamics. The Matrix Builder will stop scanning the list when the first retention or succession match is found because this will fulfill the search requirements for these element types. For the features, products and tracks elements the default behaviour is for the search to continue to exhaustively scan the list for all matches. In the case of features and products the uniquely labeled attributes that are found within the sections are cumulatively added to the stand condition, and duplicate attribute labels found in subsequent matches are ignored. In the case of tracks the uniquely labeled treatments are added to the stand condition, and duplicate treatment names found in subsequent matches are ignored. This is the default 'multi' matching behaviour. 'Solo' matching behaviour can be selected where the search processing stops with the first successful match, but this type of processing is rarely used. The search behaviour (multi or solo) is specified in the ForestModeltag.

The following example shows two select elements containing feature elements. The first select element has a query statement that is selective, and these feature attributes will only be applied to stands having matching criteria. The second select element does not have a statement attribute, and will unconditionally match to every record that it is tested against. The feature will added to the stand record only if the record has not previously been assigned a 'Visual.disturb' attribute. Every record will be assigned a 'Visual.disturb' attribute, but some records will receive the specific value for their strata and some will receive the generic value.

  <select statement="theme2 = 'N' and theme5 = 'PL'">
    <feature>
      <attribute label="Area.unmanaged.PL">
        <curve>
          <point x="5.0" y="1.0" />
        </curve>
      </attribute>
      <attribute label="Visual.disturb">
         <curve>
           <point x="0" y="1.0" />
           <point x="34" y="1.0" />
           <point x="35" y="0.0" />
        </curve>
      </attribute>
    </feature>
  </select>

  <select>
    <feature>
       <attribute label="Visual.disturb">
         <curve>
           <point x="0" y="1.0" />
           <point x="29" y="1.0" />
           <point x="30" y="0.0" />
        </curve>
      </attribute>
    </feature>
  </select>
	  

Parents

These elements contain select: ForestModel.

Children

The following elements can occur in select: features, products, retention, succession , track.

Attributes

statement

This attribute provides a query in the format of the Patchworks Query Language. If the query matches to stand record values then the contents of the select are applied to the record. If the query string is empty, or if the statement attribute is not specified then the select element will unconditionally match to all records that it is tested against.

See Also

define, assign, ForestModel.

Examples

The following example tests if the IFM field from the inventory record matches to the literal the string 'unmanaged'. Records that matches to this statement it will be assigned to a <track/> having no treatment options. Although this element is unnecessary in that it will not change the resulting output data set, it is useful to explicitly declare to the Matrix Builder the expectation that the matching stands will not have treatments, and will assist in squelching error messages about unmatched records.

  <select statement="IFM eq 'unmanaged'">
    <track />
  </select>
	    

In example below a select element contains a features element. The features elements contains attributes collections, attributes defined by curve elements, and attributes defined by curve references. The features in this element are candidates to be assigned to matching records so long as these records do not already have attributes with the same labels.

 
  <select statement="MU eq '754' and FU eq 'PWST' and IFM in managed
	    and SILVINT eq 'Prsnt'">
    <features>
      <attributes idref="Habitat.754.PWST" />
      <attributes idref="Seral" />
      <attribute label="feature.Area.managed.PWST">
         <curve>
           <point x="0.0" y="1.0" />
         </curve>
       </attribute>
       <attribute label="feature.Yield.%m.Pw">
         <curve idref="754.PWST.Prsnt.Pw" />
       </attribute>
       <attribute label="feature.Yield.%m.Po">
         <curve idref="754.PWST.Prsnt.Po" />
       </attribute>
     </features>
   </select>

In this next example the select element contains a track element (defining potential management treatments). The statement query attribute checks the forest unit, the management status, and the current silvicultural condition to determine eligibility for treatments that are contained within. If the treatment is applied the Matrix Builder will update the 'treatment' field with the value of 'Exten' for the purposes of assessing product values, and will update the 'SILVINT' field with the value of 'Exten' for the purposes of post-harvest conditions.

[Note]Note

Both this and the previous example have identical query statements. These select statements could be merged so that a single select element contains both the features and tracks elements. The Matrix Builder will correctly sort the elements in to the appropriate lists before processing begins.

  <select statement="MU eq '754' and FU eq 'PWST' and IFM in managed
           and SILVINT eq 'Prsnt'">
    <track>
     <treatment label="Exten" minage="70">
        <produce>
          <assign field="treatment" value="'Exten'" />
        </produce>
        <transition>
          <assign field="SILVINT" value="'Exten'" />
        </transition>
      </treatment>
    </track>
  </select>
	    

The final example shows a select element that contains a products element. The statement query attribute is similar to the previous, but contains an additional qualifier that checks the treatment type as was assigned in the treatment element. The product attributes record the area of the 'PWST' forest unit that is harvested and the area of 'Exten' treatment that was applied. The same Po and Pw yield curves are referenced, but scaling factors have been applied to account for operational factors (possibly logging damage or in-stand retention).

  <select statement="MU eq '754' and FU eq 'PWST' and IFM in managed
	    and SILVINT eq 'Prsnt' and treatment eq 'Exten'">
    <products>
      <attribute label="product.Area.managed.PWST">
        <curve>
          <point x="0.0" y="1.0" />
        </curve>
      </attribute>
      <attribute label="product.Treated.managed.Exten">
        <curve>
          <point x="0.0" y="1.0" />
        </curve>
      </attribute>
     <attribute label="product.Yield.managed.Po" factor="0.95">
        <curve idref="754.PWST.Prsnt.Po" />
      </attribute>
     <attribute label="product.Yield.managed.Pw" factor="0.2">
        <curve idref="754.PWST.Prsnt.Pw" />
      </attribute>
     </products>
   </select>