Python script forBiomass
See also

Aim of script

to calculate and validate parameters that can be used for estimating forest biomass.

General description

For forest inventory, biomass is a very important product. It is usually determined by close inspection of sub-regions (plots) and extrapolating those field measured data via statistical approaches for larger regions. Area-wide 3D topographic data (e.g. from ALS or image matching) gives the opportunity to assess biomass with high spatial resolution. Using the field data, regression models can be calibrated, which can be applied for the entire area of interest. In, the biomass estimation approach described in Hollaus et al. 2009 is implemented. This approach uses a semi-empirical regression model to assess the parameters e.g. biomass [tons per ha], stem volume [m3 per ha] or growing stock [m3 per ha]. This model assumes a linear relationship between the reference parameter and the 3D point cloud derived canopy volume, stratified according to n canopy height classes to account for height dependent differences in canopy structure. For the calibration of the model a shapefile is containing the field plots and the reference parameter(s) as attribute(s) is required. In addition to the calibration provides an extensive validation procedure (i.e. cross validation and validation with external reference data). The calibrated model coefficients can be applied to the entire area of interest by using Module Algebra.

Basic algorithm

The algorithm consists of the following steps:

  • using the plots in the shapefile to cut out ALS points from the provided point cloud
  • calculating the mean NormalizedZ per height class and plot and multiplying it by the percentage of points that are in this class
  • collecting this information as well as the forest inventory biomass and calculating a linear regression
  • (if validation is needed) repeating these steps but leaving out a number of plots from calibration and use them for validation instead

Usage of script

Since forBiomass depends on many input parameters, it was deemed impractical to supply them on the command line. Instead, a configuration file has to be supplied with the configFile option. To generate a new (template) configuration file, the generate flag may be used. It has to be noted that this is not an opals configuration file to be used with opals modules, but rather a stand-alone configuration file to extend this script. The parameters in the configuration file are documented with comments (starting with a #) and organized in sub-sections (marked with [brackets]). Individual parameters within a sub-section may be re-ordered, but have to stay within the same sub-section. Similarly, sub-sections may be reordered. For detailed information, please generate a template configuration file and read the comments.

Parameter description

-configFile config file including settings
Type : PathArgument
Remark : Mandatory
-generate writes config file if enabled
Type : Boolean
Remark : Optional, default: Boolean(False)
Description: If enabled an empty config file is written to the given filename as defined by the parameter configFile parameter.
Possible values:
-sampleSize sample size for cross-validation
Type : Integer
Remark : Optional, default: 0
Description: Take the given number of random sample from all plots and uses that sample for validation. The plots of this sample are NOT used for calibration. Sample size needs to be smaller than nr. of polygons in the shapefile. Overrides the plot list defined in the config file.


The data used in the following examples can be found in the $OPALS_ROOT/demo/ directory.

Example 1

This generates a template configuration file

opals forBiomass -c config_template.cfg -g True

Example 2

This runs the script with a demo configuration file: First import the laz Files into an odm:

opalsImport -inf forest/plot_mitte.laz forest/plot_nord.laz forest/plot_sued.laz -outf forest/plots.odm

Then run the script with the configfile:

opals forBiomass -c forBiomass_config.cfg

For more information on the configuration file, please see the comments in the template.


Hollaus, M., Wagner, W., Schadauer, K., Maier, B. and Gabler, K., 2009b: Growing stock estimation for alpine forests in Austria: a robust LiDAR-based approach. Canadian Journal of Forest Research 39 (7), 1387-1400.

opalsImport is the executable file of Module Import
Definition: ModuleExecutables.hpp:113
Contains the public interface of OPALS.
Definition: ApplyTrafo.hpp:5
@ c
focal length (opalsStripAdjust)