Heureka API .NET Documentation
Create input data using species data

As an alternative to populating an ApiCompartment with ApiTreeLayerData objects, you can use a specific class for species data, similar to the data used when importing stand register data with one of the Heureka applications.

 

Step 1. Create and populate a list of ApiSpeciesInputData objects.

Create species data list
Copy Code
var speciesData = new List<ApiSpeciesInputData>();
// Add data for pine trees
speciesData.Add(new ApiSpeciesInputData(species: SpeciesCode.PinusSylvestris, meanAge: 45, meanHeight: 14,
                 meanDiameterDgv: 13, basalAreaHa: 12, stemsPerHa: 500, layerType:ApiLayerType.Trees));
// Add data for overstorey pine trees
speciesData.Add(new ApiSpeciesInputData(species: SpeciesCode.PinusSylvestris, meanAge: 120, meanHeight: 24,
                 meanDiameterDgv: 29, basalAreaHa: 5, stemsPerHa: 100, layerType:ApiLayerType.Overstorey));

 // Add data for spruce trees
 speciesData.Add(new ApiSpeciesInputData(species: SpeciesCode.PiceaAbies, meanAge: 100, meanHeight: 22,
                 meanDiameterDgv: 22, basalAreaHa: 11.5, stemsPerHa: 600, layerType: ApiLayerType.Trees));

Today Heureka cannot make growth projections for a stand that include several layers where some have layer type ApiLayerType.Saplings and others have ApiLayerType.Trees.

Hoewever, ApiLayerType.Saplings and ApiLayerType.Overstorey can be present at the same time, as well as ApiLayerType.Trees and ApiLayerType.Overstorey.

 

Step 2. Add species list to the compartment (or pass to the ApiCompartment constructor).

Example Title
Copy Code
compartment.AddTreeLayersFromSpeciesData(speciesData);