FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
FMTForest.h
Go to the documentation of this file.
1/*
2Copyright (c) 2019 Gouvernement du Québec
3
4SPDX-License-Identifier: LiLiQ-R-1.1
5License-Filename: LICENSES/EN/LiLiQ-R11unicode.txt
6*/
7
8#ifndef FMTFOREST_Hm_included
9#define FMTFOREST_Hm_included
10
11
12#include "FMTLayer.hpp"
13#include "FMTDevelopment.h"
14#include <iterator>
15#include <numeric>
16
17namespace Core {
18 class FMTTheme;
19 class FMTActualDevelopment;
20 class FMTFuturDevelopment;
21}
22
23
24namespace Spatial
25 {
26 // DocString: FMTForest
32 class FMTEXPORT FMTForest: public FMTLayer<Core::FMTDevelopment>
33 {
34 friend class boost::serialization::access;
35 // DocString: FMTForest::serialize
42 template<class Archive>
43 void serialize(Archive& ar, const unsigned int version)
44 {
45 ar & boost::serialization::make_nvp("layer", boost::serialization::base_object<FMTLayer<Core::FMTDevelopment>>(*this));
46 }
47 public:
48 // DocString: FMTForest()
53 // DocString: FMTForest(const FMTForest&)
58 FMTForest(const FMTForest& rhs);
59 // DocString: FMTForest(const FMTLayer<Core::FMTDevelopment>&)
65 // DocString: FMTForest::operator=
71 FMTForest& operator = (const FMTForest& rhs);
72 // DocString: FMTForest::getArea
77 std::vector<Core::FMTActualDevelopment>getArea() const;
78 // DocString: FMTForest::setLastThemeWithArea
85 void setLastThemeWithArea(const std::vector<Core::FMTActualDevelopment>& p_devs,
86 const std::vector<Core::FMTTheme>& p_themes);
87 // DocString: FMTForest::getCopy
93 FMTForest getCopy(bool copyData = true) const;
94 // DocString: FMTForest::grow
99 FMTForest grow() const;
100 // DocString: FMTForest::getThemes
106 std::vector<FMTLayer<std::string>> getThemes(const std::vector<Core::FMTTheme>& themes) const;
107 // DocString: FMTForest::getAge
113 // DocString: FMTForest::getLock
119 // DocString: FMTForest::setPeriod
124 void setPeriod(int period);
125 // DocString: FMTForest::preSolve
132 FMTForest preSolve(const Core::FMTMaskFilter& filter, const std::vector<Core::FMTTheme>&presolvedthemes) const;
133 // DocString: FMTForest::postSolve
140 FMTForest postSolve(const Core::FMTMaskFilter& filter, const std::vector<Core::FMTTheme>&originalbasethemes) const;
141 };
142 }
143#endif // FMTFOREST_Hm_included
#define FMTEXPORT
Definition: FMTutility.h:125
Filter built from masks used to preSolve and postsolve FMTMask objects.
Definition: FMTMaskFilter.h:31
Spatially referenced layer of Core::FMTDevelopment representing the forest.
Definition: FMTForest.h:33
FMTForest postSolve(const Core::FMTMaskFilter &filter, const std::vector< Core::FMTTheme > &originalbasethemes) const
Return a postsolved copy of the forest by postsolving each development mask.
void setPeriod(int period)
Set the period of every development of the forest.
void setLastThemeWithArea(const std::vector< Core::FMTActualDevelopment > &p_devs, const std::vector< Core::FMTTheme > &p_themes)
Set the last theme attribute of each development from the area developments matching the other themes...
FMTForest(const FMTForest &rhs)
Copy constructor for FMTForest.
FMTLayer< std::string > getLock() const
Return a string layer with the lock of each locked development.
FMTForest preSolve(const Core::FMTMaskFilter &filter, const std::vector< Core::FMTTheme > &presolvedthemes) const
Return a presolved copy of the forest by presolving each development with the mask filter.
FMTForest()
Default constructor for FMTForest.
FMTForest getCopy(bool copyData=true) const
Return a copy of the forest layer.
std::vector< Core::FMTActualDevelopment > getArea() const
Return the actual developments of the forest, aggregating the area of identical developments by cell ...
FMTLayer< int > getAge() const
Return a layer with the age of each development.
FMTForest(const FMTLayer< Core::FMTDevelopment > &rhs)
Construct a FMTForest from a layer of developments.
FMTForest grow() const
Grow every development of the forest by one period.
std::vector< FMTLayer< std::string > > getThemes(const std::vector< Core::FMTTheme > &themes) const
Return one string layer per theme with the attribute value of each development.
Definition: FMTParser.h:54
The Core namespace provides classes for simulating stands/strata growth/harvest through time.
Definition: FMTAction.h:34
Definition: FMTAreaParser.h:40