Example PIN File Definition

The following example is a simple Patch Report definition in a PIN file.

/*
 * Define a patch report for SEFA stands in the HEU compartment
 */
      RangeLabel[] patchSize = new RangeLabel[] {new RangeLabel("0_100", 0, 100),
                                                 new RangeLabel("100_400", 100, 400),
                                                 new RangeLabel("400_800", 400, 800),
                                                 new RangeLabel("800_1600", 800, 1600),
                                                 new RangeLabel("1600+", 1600, 9999999999),
                                                };
        
      reportWriter.addReport(new PatchReport("PatchReportSEFA_HEU",
                                             "Patch Report for SEFA stands in the HEU compartment",
                                             "ha",
                                              control.getBlockTable(),
                                              compart='HEU',
                                              topology,
                                              "feature.Area.managed.SEFA",
                                              patchSize,
                                              periods,
                                              ""
                                             ));
      

A Patch Report would be most effectively used to display attribute information contained in the Block Table, as attributes in the Block Table are organized in columns with prefixes. In this way a Patch Report would allow you to summarize information about particular Blocks in the dataset. A reselect expression could be used to limit the number of Blocks that were being summarized, or all blocks could be included.

In this particular example, a Patch report was added to the main report folder with the filename "PatchReportSEFA_HEU"". NO file extension was specified here as the Report Writer will automatically create three separate files: "PatchReportSEFA_HEU.html", "PatchReportSEFA_HEU.csv" and "PatchReportSEFA_HEU.png". The title of the report, "Patch Report for SEFA stands in the HEU compartment" will appear at the top of the HTML and PNG sub-reports, as well as in the Index Report for the "area" sub-folder, and the directory tree. The units "ha" will appear on the Y-axis of the PNG bar chart.

The information for this report was derived from the Block Table (control.getBlockTable()) using the column prefix of "feature.Area.managed.SEFA". The only rows that were selected from the Block Table to be summed for cell values were those rows that contained "HEU" in the "compart" column of the table. The reselectExpression "compart='HEU'" was used to narrow the amount of information being summed to only those Blocks (rows) that fell into compartment 'HEU', all other blocks were ignored.

All planning periods would have been represented in this report, along with the initial conditions.