InventoryManager: Import Tree and Log Data

Overview

Tree and Log data can be imported from other systems including TCruise desktop, TCruise Mobile, DataPlus, etc. Regardless of the import, the Stands and Plots spatial features must already exist in ArcGIS. For more information on creating Stands and Plots outside of MobileMap and InventoryManager, see https://woodlandsg.atlassian.net/wiki/spaces/MD/pages/582746118.

Stands and Plots

As noted in the overview, Stands and Plots must already exist in ArcGIS and must have valid relationships. Stands and Plots must have values for their Unique_ID field, and plots must include their parent Stand’s Unique_ID in their Parent_ID field. Additionally Stands must include a valid and unique value in their Stand_ID field. Similarly, Plots must include a valid value in their Plot_ID field. Stand_IDs must be globally unique while Plot_IDs need only to be unique within their Stand. It may be useful to use the 'Validate Plots' tool https://woodlandsg.atlassian.net/wiki/spaces/MD/pages/1340604419 to ensure that Plots have Unique_ID values and correctly reference their parent Stand.

Import CSV Tool

The ‘Import CSV' tool in InventoryManager is similar to the 'Export’ tool (with Excel output) in that it uses a configuration file to crosswalk between incoming data model (columns in the CSV file) and the outgoing data model (ArcGIS feature service used to store Stands, Plots, Trees, Logs). To create an import process, therefore, you must one or more data file(s) and an import configuration file.

Import Configuration File

The import configuration file follows the same format as the export configuration file described at https://woodlandsg.atlassian.net/wiki/spaces/MD/pages/307790025 . It may contain fewer attribute fields because:

  1. Some legacy systems supported fewer attributes, especially at the Stands and Plots levels

  2. Some attributes may not be desired when importing data

The table below shows an example of a simple import configuration file for importing Tree-level (no Logs) data produced from a TCruise SQLite Export file using the processed described in the next section:

table

index

esriName

exportName

Stands

1

Stand_ID

Stand_ID

Stands

2

Status

Status

Plots

1

Stand_ID

Stand_ID

Plots

2

Plot_ID

Plot_ID

Plots

3

Status

Status

Trees

1

Stand_ID

Stand_ID

Trees

2

Plot_ID

Plot_ID

Trees

3

Tree_ID

Tree_ID

Trees

4

Species

Species

Trees

5

Tally

Tally

Trees

6

DBH

DBH

Trees

7

Height_to_Record_Top_Diameter

Height_to_Record_Top_Diameter

Trees

8

Product_Number

Product_Number

Trees

9

Reproduction

Reproduction

Trees

10

Saw_Stopper

Saw_Stopper

Trees

11

Pulp_Stopper

Pulp_Stopper

Data Files - General

Data files for the 'Import CSV' tool are single tables that contain all of the attribute information that will be imported for the Stands, Plots, Trees and Logs. They are non-normalized data, meaning that there will be redundant data at the higher levels (e.g., Stands and Plots). If logs are included in the import, the data file will have 1 row for each log, and thus each tree will be repeated multiple times - once for each log in that tree. If logs are not included, the data file will have 1 row for each tree, and thus each plot will be repeated multiple times, once for each tree in that plot.

Often it is necessary to manipulate the incoming data prior to running the Import CSV tool to ensure that the data have column names, data types and data that match the target Esri data model. Some changes can be handled in the Import Config file by adjusting the exportName value to match the incoming column names. Other changes may need to be made to the incoming tree CSV file. These changes can be made using a number of different applications and approaches, including functions in Excel, queries in MS Access, etc.

Data Files - TCruise Desktop

To create a data files for the 'Import CSV' from data stored in TCruise Desktop, use the Export as SQLite option to export a SQLite file that contains the data. Follow the steps below to generate a data file from that SQLite file:

  1. Open the TCruise SQLite export file in DB Browser

  2. Paste the following SQL command into the Execute SQL tab:

  3. select
    Plots.STRATUMID as Stand_ID,
    "Cruised" as Status,
    Plots.PLOTID as Plot_ID,
    "Cruised" as Status,
    TREENO as Tree_ID,
    SPC as Species,
    COUNT as Tally,
    DBH,
    HM as Height_to_Record_Top_Diameter,
    PN as Product_Number,
    RP as Reproduction,
    IIF(STTOP < 999, STTOP, "") as Saw_Stopper,
    IIF(PWTOP < 999, PWTOP, "") as Pulp_Stopper
    from Trees
    left join Plots on Trees.PLOTNO = Plots.PLOTNO

  4. Click run and verify the correct number of records, the values in all attributes, etc. Modify the SQL command as needed to fix column names, include/exclude columns, etc.

  5. Export table as CSV file by clicking Save the results view > Export to CSV

  6. Open CSV file in Excel to perform final QC prior to import. Verify that Stand_IDs and Plot_IDs match data in map in InventoryManager

  7. InventoryManager

    1. Select ‘Import CSV’ tab

    2. Select import configuration CSV file

    3. Select the data file created using steps above

    4. Click the Stands - Process button to load the Stands attributes (only Status field if using SQL above).

    5. Click the Plots- Process button to load the Plots attributes (only Status field if using SQL above)

    6. Click the Trees - Process button to load the Trees records

    7. If Logs will be loaded, click the Logs- Process button to load the Logs records

 

Note that the Process button will be disabled after it is clicked to prevent the accidental re-run of that step. This is especially important with the Trees and Logs levels as it could result in the creation of duplicate data.

Import Scenarios

The process described above assumes that the user intends to recreate the Stand, Plot, Tree and optionally Log data exactly as they exist in another system. There are other scenarios were this is not needed. When historical or simulated data are being loaded for verification and testing, it may not always be necessary to recreate the exact geometry of Stands or Plots. Consider the following 2 scenarios:

  1. Verification - A user is assessing a new InventoryManager compilation report and wants to compare some values to a historical cruise report generated from a different system. They need the acres to be correct, but they don’t care about the location or shape of the stand polygon. They need the number of plots and the plot size to be correct, but they don’t care about the location of each plot.

  2. Historical - A user has historical data that they want to include in InventoryManager so they can run the same reports on historical data as they due for recently collected data. In this case, they expect the shape and location of the Stand to be accurate, but they do not care about the location of the plots.

In scenario 1 above, the user could manually digitize a stand using standard heads-up digitizing https://woodlandsg.atlassian.net/wiki/spaces/MD/pages/307822593. It may be necessary to manually adjust the stand boundary size to achieve the proper area (acres). Once a stand has been created that is the correct size, the Plots tool could be used to create the correct number of plots. So long as the Stand_ID and Plot_IDs match those of the tree records in their trees CSV file, they could then import their tree data and the import CSV tool will assign the trees to their correct plots.

In scenario 2 above, the historic Stand could be imported via the Import SHP tool or copied from another layer using the Copy tool , then the plot layout and tree import from CSV could proceed as described above.