iLand
Classes | Public Member Functions | List of all members
StandLoader Class Reference

loads (initializes) trees for a "stand" from various sources. More...

#include <standloader.h>

Public Member Functions

 StandLoader (Model *model)
 
 ~StandLoader ()
 
void setMap (const MapGrid *map)
 define a stand grid externally More...
 
void setInitHeightGrid (const MapGrid *height_grid)
 set a constraining height grid (10m resolution) More...
 
void processInit ()
 main function of stand initialization the function loads - depending on the XML project file - inits for a single resource unit, for polygons or a snapshot from a database. More...
 
void processAfterInit ()
 this function is called after the init and after initial LIF-calculations. More...
 
int loadPicusFile (const QString &fileName, ResourceUnit *ru=NULL)
 load a single tree file (picus or iland style). return number of trees loaded. More...
 
int loadiLandFile (const QString &fileName, ResourceUnit *ru=NULL, int stand_id=0)
 load a tree distribution based on dbh classes. return number of trees loaded. More...
 
int loadSingleTreeList (const QString &content, ResourceUnit *ru=NULL, const QString &fileName="")
 worker function to load a file containing single trees More...
 
int loadDistributionList (const QString &content, ResourceUnit *ru=NULL, int stand_id=0, const QString &fileName="")
 worker function to load a file containing rows with dbhclasses More...
 
int loadSaplings (const QString &content, int stand_id, const QString &fileName=QString())
 a (hacky) way of adding saplings of a certain age to a stand defined by 'stand_id'. More...
 
int loadSaplingsLIF (int stand_id, const CSVFile &init, int low_index, int high_index)
 

Detailed Description

loads (initializes) trees for a "stand" from various sources.

StandLoader initializes trees on the landscape. It reads (usually) from text files, creates the trees and distributes the trees on the landscape (on the ResoureceUnit or on a stand defined by a grid).

See http://iland-model.org/initialize+trees

Constructor & Destructor Documentation

◆ StandLoader()

StandLoader::StandLoader ( Model model)
inline

◆ ~StandLoader()

StandLoader::~StandLoader ( )

Member Function Documentation

◆ loadDistributionList()

int StandLoader::loadDistributionList ( const QString &  content,
ResourceUnit ru = NULL,
int  stand_id = 0,
const QString &  fileName = "" 
)

worker function to load a file containing rows with dbhclasses

initialize trees on a resource unit based on dbh distributions.

use a fairly clever algorithm to determine tree positions. see http://iland-model.org/initialize+trees

Parameters
contenttree init file (including headers) in a string
ruresource unit
fileNamesource file name (for error reporting)
Returns
number of trees added

◆ loadiLandFile()

int StandLoader::loadiLandFile ( const QString &  fileName,
ResourceUnit ru = NULL,
int  stand_id = 0 
)

load a tree distribution based on dbh classes. return number of trees loaded.

◆ loadPicusFile()

int StandLoader::loadPicusFile ( const QString &  fileName,
ResourceUnit ru = NULL 
)

load a single tree file (picus or iland style). return number of trees loaded.

◆ loadSaplings()

int StandLoader::loadSaplings ( const QString &  content,
int  stand_id,
const QString &  fileName = QString() 
)

a (hacky) way of adding saplings of a certain age to a stand defined by 'stand_id'.

◆ loadSaplingsLIF()

int StandLoader::loadSaplingsLIF ( int  stand_id,
const CSVFile init,
int  low_index,
int  high_index 
)

◆ loadSingleTreeList()

int StandLoader::loadSingleTreeList ( const QString &  content,
ResourceUnit ru = NULL,
const QString &  fileName = "" 
)

worker function to load a file containing single trees

load a list of trees (given by content) to a resource unit.

Param fileName is just for error reporting. returns the number of loaded trees.

◆ processAfterInit()

void StandLoader::processAfterInit ( )

this function is called after the init and after initial LIF-calculations.

◆ processInit()

void StandLoader::processInit ( )

main function of stand initialization the function loads - depending on the XML project file - inits for a single resource unit, for polygons or a snapshot from a database.

main routine of the stand setup.

◆ setInitHeightGrid()

void StandLoader::setInitHeightGrid ( const MapGrid height_grid)
inline

set a constraining height grid (10m resolution)

◆ setMap()

void StandLoader::setMap ( const MapGrid map)
inline

define a stand grid externally


The documentation for this class was generated from the following files: