Overview
An important function of InventoryManager is to enable access to inventory data in a range of formats. This supports integration with other forest information systems as well as analysis using custom tools and processes. When enabled, export of inventory data will typically be accessed from a tap on the sub-menu labeled ‘Export’ or ‘Cruise’. Inventory Export supports two file formats (Excel and SQLite) and is highly configurable via range of options and an export configuration file. Some organizations use multiple export configuration files in order to tailor data exports for different uses (e.g., one for custom data quality assessment in Excel, another for export to FVS for growth and yield analysis, and a third for export to TCruise for compilation and reporting).
The general process for Inventory Export is to select a set of stands to be exported, select an export configuration file, configure other aspects of the export (including how to handle data stored in fields with coded value domains, selection of target systems like FVS or TCruise, etc.), then run the export. The Inventory Export process begins by exporting the selected stands, then it exports all plots within those stands, then all trees within those plots and where appropriate, all logs within those trees.
Selecting Data for Export
The Inventory Export process typically begins in the Map by searching for and selecting a set of Stands to be exported. Typical scenarios include searching for all stands that have a status of ‘Cruised’ or ‘Checked’, with the possible addition of spatial parameters like a specific property or region. See InventoryManager: Search for more information on searching for Stands to export.
Export Configuration File
To export cruise data, an export configuration file stored in CSV format (*.csv) is used to translate and map attribute fields from the cruise data model to the data model required by the compilation software. Use the Choose File button to browse your system and load a config file. The config file can be created in Excel and is a lookup table that matches the tables and fields of the Esri data model with the desired output tabs and fields in the exported Excel file.
The columns in the config CSV file are as follows:
table - name of the table (spatial or attribute) in the Esri data model.
index - the order the field should be outputed in the exported file (1-n).
esriName - the name of the field in the Esri data model.
exportName - the name of the field in the output Excel file.
defaultValue - a default value which will be written if the incoming field does not exist or there is no value on an incoming record.
dataType - one of TEXT,INT,DOUBLE indicating the data type. This field is optional, and is currently only used when exporting for TCruise. Use INT for date fields.
The config file enables the following functionality:
Excluding fields - if a field is present in the Esri data model which is not desired in the export (e.g., OBJECTID) it can be left out of the config file and will not be exported.
Reordering fields - if fields in the config file are listed in a different order than in the Esri data model, they will be exported in the order of they are listed in the config file, not the order they occur in the data model.
Renaming fields - the export field name is independent from the Esri field name, thus a field named ‘DBH’ can be exported as ‘diameter’.
Adding fields - if a field is not present in the Esri data model, but is needed in the export file as an input to another process, it can be inserted in the desired field order in the export file. If a default value is provided for that field, that value will be inserted for all output records. An example might be the field ‘Measurement Year’, which could be included at the Stand level in the export configuration file with a default value set to the current year. In this scenario, the Stands tab in the exported Excel file would contain a column called ‘Measurement Year’ and each Stand record would contain the current year in that column, even though that field the Esri data model.
Auto-numbered fields - if the export file should have an auto-numbered field (e.g., unique plot numbers from 1 to n) this can be set using the name 'AUTOINCREMENT' as the Esri field name
Parent/Grandparent fields - if an export field is not available on the matching table, it can be copied in from the parent or grandparent table. For example, if Stand ID is desired on the Trees tab of the export Excel file, but is not stored on each tree (not included in the Esri data model for Trees), it can be copied from the Plot or Stand table. To do this, prefix the Esri field name with “STANDS.” or “PLOTS.”, depending on which layer should be used to lookup the desired value.
Lookup values from list - if the export value should come from a list of allowed values, but that list does not match the Coded Value Domain list for that field, a custom lookup table can be provided in the config file. For example, if the MobileMap Cruise_Type field on the Trees table (S=standard cruise, C=check cruise) needs to be cross-walked to the field RECTYP (used by TCruise), the following syntax can be used: LOOKUP(Cruise_Type:S=0;C=1). This example will apply the custom ‘lookup’ function and use the value found in the Cruise_Type field, replacing all instances of ‘S' with the value 0, and all instances of 'C' with the value 1.
Stands To Export
In addition to the original selection of stands described above, the stands to be exported can be further constrained using the Stands to Export setting on the Inventory Export tab.
Choose the category of stands to be exported from the drop-down menu.
Selected stand(s) - will export all of the stands that are currently selected in the map.
Cruised stands - will only select those stands where the status field has been set to cruised (requires that the system has been properly configured to identify the status attribute field and the values that qualify as cruised (e.g., ‘Cruised’ and ‘Checked’)
All cruised (not checked) stands - similar to above, but will omit stands that have been checked
All checked stands - similar to above but includes only those stands that have been checked
Stands updated on/after… - will apply a starting date constraint on the last_modified_date field in order to only export the most recent data. An example of this would be if you need to export only those stands that were updated in the last 2 weeks. When using this option the date field below must be set to a valid date.
Export Codes Or Descriptions
For attribute fields that use coded value domains, it is possible to export either the codes or their descriptions. For example, if the species field uses 2-letter species codes, selecting Export codes would export the code ‘DF’ for Douglas fir, while selecting Export descriptions would export ‘Douglas fir’. This is a global setting and thus will use either codes or descriptions for all fields for all tables. It is typical to use descriptions when performing ad hoc review as they may be easier to interpret when scanning for data quality issues. When exporting data for other forest information systems, however, it is often necessary to export the codes for compatibility.
Calculate Check Cruise Score
Check cruise score calculation can be performed during the Inventory Export process. Check cruise score calculation requires that a Check_Rules table is present in the data model and is populated with one or more check cruise score rules. These rules define the quality control tests that should be applied and the point deductions that should be calculated. Below are some example check cruise score rules, written in a human readable format:
If species is incorrect, deduct 5 points
If the total height is off by more than 15%, deduct 3 points
If plot was not properly flagged, deduct 2 points
When check cruise score calculation is applied, the general logic is as follows:
Score calculations occur at the tree and plot levels
Tree level calculations are performed first
For each tree, the sum of its deductions isrecorded, along with a comma separated list of tree rules that were violated
Tree deductions for all trees on a plot are summed together as one component of the plot deductions
Additional plot deductions are applied if plot level check score rules are violated
The final set of plot deductions (plot level + sum of tree level) and subtracted from 100 to achieve a plot score
For each plot, the plot score is recorded, along with a comma separated list of tree and plot rules that were violated
The plot level score is written back to the Plots table to the fields ‘Check_Score’ and ‘Check_Details’ (these fields must be included in the Plots table for this functionality
To enable check cruise score calculating during export, check the Calculate check cruise score checkbox prior to clicking Export. When the export completes, if data were successfully written back to the Plots table a notification window will display the results of this process.
FVS Export
The Forest Vegetation Simulator (FVS) is a free software application developed by the US Forest Service. It is commonly used by foresters to perform growth and yield modeling, but can also be used to model wildfire fuel or carbon. The most recent releases of FVS use a web-based interface, rather than the older desktop Suppose application, and imports data via a SQLite database file.
Inventory Export supports export of data for FVS by writing out an FVS compatible SQLite database file. In order for to produce a valid FVS export, however, it is critical to use an export configuration file that maps between the Esri data model fields and the FVS expected fields. Successful creation of an export configuration file for FVS requires knowlege of FVS inputs and your Esri data model. To help support the creation of export configuration files, MB&G can provide example files that have been used by others for FVS data export.
When exporting data for FVS, use the appropriate export configuration file and check the box labeled Export for FVS (*.db).
This will produce a SQLite database suitable for use in the new version of FVS. The basic workflow for using this file within FVS is outlined below:
Open FVS (web-based version, not Suppose. Application will open in browser using 'loopback' URL 127.0.0.1)
Import Data Tab (upper left)
Browse for file
Install uploaded database
Runs Tab (upper left)
Click ‘New’ button
On ‘Groups’ tab, select ‘All_Stands’ item from list, then click ‘Add stands in selected groups’ button below lists
Time Tab (mid right)
Select start, stop and interval
Select Outputs Tab
Check boxes for ‘Tree Lists’ and ‘Inventory Statistics’ (and others for which you have input data, e.g., carbon, fuels, etc.)
*Run* Tab
Click ‘Save and Run’
Review output chart
Review units & values
Modify data, settings, etc. as needed