23#ifndef DBHDISTRIBUTION_H
24#define DBHDISTRIBUTION_H
54 void addStand(
const int standId,
const double area, QVector<Tree *> &tree_list);
57 double dbhClass(
const QString &speciesId,
const float dbh)
const;
59 double dbhClass(
const QString &speciesId,
const int class_index)
const;
69 void setTotalArea(
const double total_area_ha) { mTotalArea = total_area_ha; }
73 SStandInfo(): standId(0), area(0.), volume(0.), basalarea(0.), stems(0) {}
82 QVector< double* > mData;
83 QVector< QString > mSpeciesIds;
84 SStandInfo mLandscapeInfo;
86 QHash<int, QVector<double*> > mStands;
87 QHash<int, SStandInfo > mStandInfo;
90 void addTree(
const Tree *t) {addTree(t, mData);}
91 void addTree(
const Tree *t, QVector< double* > &distribution);
92 void clear(QVector< double* > &distribution);
94 void addDistribution(
const QVector<double *> &source, QVector<double*> &target);
The class DBHDistribution encapsulates a DBH distribution on the landscape level.
Definition: dbhdistribution.h:32
QString classLabel(const int class_index)
return the label of the class class_index.
Definition: dbhdistribution.cpp:163
void addResourceUnit(const ResourceUnit *ru)
add the trees of the resource unit ru.
Definition: dbhdistribution.cpp:79
void addStand(const int standId)
add/replace the DBH distribution for a stand denoted by standId. Use all trees of the stand.
Definition: dbhdistribution.cpp:63
int nClasses() const
return the number of DBH classes
Definition: dbhdistribution.h:61
DBHDistribution(QObject *parent=0)
Definition: dbhdistribution.cpp:153
double dbhClass(const QString &speciesId, const int class_index) const
get trees/ha of species speciesID in class classIndex(0..nClasses()-1)
int classIndex(const float dbh) const
return the index of the class where dbh falls into (0..nClasses()-1)
Definition: dbhdistribution.cpp:158
void saveToTextFile(QString filename)
Definition: dbhdistribution.cpp:116
void calculateFromLandscape()
renew the full DBH distribution over the full landscape (by iterating over all trees)
Definition: dbhdistribution.cpp:37
void saveStandInfo(QString filename)
Definition: dbhdistribution.cpp:135
void setTotalArea(const double total_area_ha)
Definition: dbhdistribution.h:69
~DBHDistribution()
Definition: dbhdistribution.cpp:32
double dbhClass(const QString &speciesId, const float dbh) const
get trees/ha of species speciesID in class in which dbh falls into
void calculate()
calculate the total DBH distribution on the landscape (by summing up over stand wise DBH distribution...
Definition: dbhdistribution.cpp:47
double totalArea() const
Definition: dbhdistribution.h:70
ResourceUnit is the spatial unit that encapsulates a forest stand and links to several environmental ...
Definition: resourceunit.h:49
A tree is the basic simulation entity of iLand and represents a single tree.
Definition: tree.h:44