INPUTS

All commands related to accessing and reading forest inventory data fall under this ‘Inputs’ command group.

 

There are two main sources that OSM can read data from:

1)      OLE data connections (Databases, Servers, Excel)

2)      OSM local data cashe

 

For OLE data sources, two required tables must be present:

1)      OSM_STANDLIST – contains stand-level attributes

2)      OSM_TREELIST – contains tree-level attributes.

 

See input tables for a detailed description of tables and columns required.

 

Connecting to a database

Changing OSM input table names

USA units

Speed up inventory record loading

Cashing inventory data

 

Connecting to a database using the ‘SOURCE’ command

Microsoft Access 2002-2013 is the default and preferred (well tested) data source when loading data to OSM through INPUTS commands.

 

To connect to an access database, simply state:

INPUTS.Source “C:\MyInventoryData.accdb”

 

Relative paths can be used for Access database locations.

 

For data sources other than Access, a fully qualified connection string is required.

INPUTS.Source “My connection string”

 

Changing OSM input table names

By default OSM will look for tables or queries named OSM_STANDLIST and OSM_TREELIST to load inventory records.

 

To change the OSM_STANDLIST table name to simply STANDS:

INPUTS.StandList “STANDS”

 

To change the OSM_TREELIST table name to simply TREES:

INPUTS.TreeList “TREES”

 

OSM is not case-sensitive and double quotes are only required around arguments if they contain spaces.  

 

USA units

By default OSM assumes metric units; however, USA (English) units can be used in tables.

INPUTS.Units USA

 

By using the command above, OSM will convert the USA units to metric on import.

 

Note that to report in USA units, you must also specify the unit system in OUTPUTS commands.

 

Speed up inventory record loading

Add an index to your SurveyID column in your OSM_TreeList table:

Reason

When SurveyID is not indexed, OSM must read through all tree records in the OSM_TreeList table to select trees associated with the stand to be simulated. If 100 stands are to be simulated, then OSM must scan all OSM_TreeList records 100 times. This repeated reading will cause an exponential slowdown to your overall simulation processing time as the number of records in OSM_TreeList increases. This issue can be avoided by adding an index to your SurveyID column in the OSM_TreeList table. The index allows the database to pull out records for the stand to simulate with a single operation.

 

If an index cannot be added to your database, cashing is another option to speed up record reading, as described below.

 

 

Cashing inventory data

Reading data from web server databases or from large enterprise data systems can sometimes be slow. For these cases, users can store all of their inventory data locally on their file system using an OSM data cashe (zip archive of OSM data files containing your inventory records). The data cashe must be built as a one-time operation using the BUILD command as shown below.

 

INPUTS.SOURCE “C:\MyInventoryData.accdb”

 

INPUTS.Cashe.FilePath “C:\...\MyDataCashe.zip”

INPUTS.Cashe.Build

 

Note that the database SOURCE and cashe FILEPATH locations must be stated first. Once the build command is processed, OSM will immediately begin reading all of your stand and tree table records into the zip file.  If the zip file already exists, it will be deleted and then recreated. Cashe location (zip file argument) can be a relative file path and only requires surrounding double quotes if the file path contains spaces.

 

Important: If you change any data values, records, or columns in the source database, the cashe will need to be completely rebuilt.

 

Once the cashe is built, you no longer need to state SOURCE or UNITS commands. The command required to tell OSM where your data should come from is:

INPUTS.Cashe.FilePath “C:\...\MyDataCashe.zip”

 

For large datasets, you should notice a significant reduction in overall processing time when using the cashe, compared to using database queries.

 

Cashe Examples

Building a data cashe from and access database.

INPUTS

Source “C:\MyInventoryData.accdb”

StandList “STANDS”

TreeList “TREES”

UNITS USA

 

Cashe

FilePath “C:\...\MyDataCashe.zip”

Build

 

Setting reference to an OSM data cashe.

INPUTS.Cashe.FilePath “C:\...\MyDataCashe.zip”