Class StandEventReport

java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.patchworks.StandEventReport
All Implemented Interfaces:
Selectable<Report>, Comparable<Report>

public class StandEventReport extends Report
This class defines a report that saves the stand dynamics events for all of the stands in to a CSV file. This report contains initial conditions, succession events and treatments for both the managed and unmanaged portions of each block.

The CSV file contains the following columns:

Output columns
NameDescription
BLOCKThe id label for the block
TYPE'MANAGED' or 'UNMANAGED'
DELTAThe time in the future of the event
SEQThe sequence number to resolve the order of events
EVENTThe event name. _Initial_ for initial conditions at time zero, _Succssn_ for a succession event, otherwise the treatment label.
AREAThe area of this event. May be smaller than the stand area for partial treatments
PRE_AGEThe age of the stand before the event
POST_AGEThe age of the stand after the event
stratificationA column for each of the stratification variables that result after the event

Initial and SUccession events apply to the entire area. It is possible that treatments may only apply to a portion of the area (for example partial harvest, or transfer to non-forest categories such as roads and landings). This report can evaluate an expression to determine the area treated. If the expression is not supplied then the entire area will be used.

This report is access be a method in the Control object (Control.getStandEventReport(java.lang.String, java.lang.String, java.lang.String, java.lang.String)). For example,

 reportWriter.addReport(control.getStandEventReport("standEvents.csv",
    "Stand Event Report", "product.harvested", null));
 
  • Field Details

    • TYPES

      public static final String[] TYPES
  • Method Details

    • getTreatedManAreaExpr

      public String getTreatedManAreaExpr()
      Get the expression used to determine the area treated in managed part of the block.
    • getTreatedUnmanAreaExpr

      public String getTreatedUnmanAreaExpr()
      Get the expression used to determine the area treated in unmanaged part of the block.
    • doReport

      public ca.spatial.reportwriter.Report.DataCache doReport(String filename, PrintStream out, Map<String,​Object> param, ca.spatial.reportwriter.Report.DataCache cache)
      Description copied from class: Report
      The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports.
      Specified by:
      doReport in class Report
      Parameters:
      filename - The full name of the report to be printed, including the extension of the sub-report (if any).
      out - The output stream to print output on to.
      param - A HashMap containing parameters that modify the report (for example the scenario name).
    • getTypes

      public String[] getTypes()
      Description copied from class: Report
      An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
      Specified by:
      getTypes in class Report