FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Spatial::FMTForest Class Reference

Spatially referenced layer of Core::FMTDevelopment representing the forest. More...

#include <FMTForest.h>

Inheritance diagram for Spatial::FMTForest:
[legend]
Collaboration diagram for Spatial::FMTForest:
[legend]

Public Member Functions

 FMTForest ()
 Default constructor for FMTForest.
 
 FMTForest (const FMTForest &rhs)
 Copy constructor for FMTForest.
 
 FMTForest (const FMTLayer< Core::FMTDevelopment > &rhs)
 Construct a FMTForest from a layer of developments.
 
FMTForestoperator= (const FMTForest &rhs)
 Copy assignment for FMTForest.
 
std::vector< Core::FMTActualDevelopmentgetArea () const
 Return the actual developments of the forest, aggregating the area of identical developments by cell size.
 
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 getCopy (bool copyData=true) const
 Return a copy of the forest layer.
 
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.
 
FMTLayer< int > getAge () const
 Return a layer with the age of each development.
 
FMTLayer< std::string > getLock () const
 Return a string layer with the lock of each locked development.
 
void setPeriod (int period)
 Set the period of every development of the forest.
 
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 postSolve (const Core::FMTMaskFilter &filter, const std::vector< Core::FMTTheme > &originalbasethemes) const
 Return a postsolved copy of the forest by postsolving each development mask.
 

Friends

class boost::serialization::access
 

Detailed Description

Spatially referenced layer of Core::FMTDevelopment representing the forest.

FMTForest is a FMTLayer mapping each spatial cell to a FMTDevelopment and provides growth, area aggregation and preSolve / postsolve operations on the forest.

Constructor & Destructor Documentation

◆ FMTForest() [1/3]

Spatial::FMTForest::FMTForest ( )

Default constructor for FMTForest.

◆ FMTForest() [2/3]

Spatial::FMTForest::FMTForest ( const FMTForest rhs)

Copy constructor for FMTForest.

Parameters
[in]rhsthe FMTForest to copy.

◆ FMTForest() [3/3]

Spatial::FMTForest::FMTForest ( const FMTLayer< Core::FMTDevelopment > &  rhs)

Construct a FMTForest from a layer of developments.

Parameters
[in]rhsthe layer of developments to construct from.

Member Function Documentation

◆ getAge()

FMTLayer< int > Spatial::FMTForest::getAge ( ) const

Return a layer with the age of each development.

Returns
an int layer of ages.

◆ getArea()

std::vector< Core::FMTActualDevelopment > Spatial::FMTForest::getArea ( ) const

Return the actual developments of the forest, aggregating the area of identical developments by cell size.

Returns
the actual developments of the forest.

◆ getCopy()

FMTForest Spatial::FMTForest::getCopy ( bool  copyData = true) const

Return a copy of the forest layer.

Parameters
[in]copyDataif true copies the development data, otherwise returns an empty layer with the same spatial reference.
Returns
the copied forest.

◆ getLock()

FMTLayer< std::string > Spatial::FMTForest::getLock ( ) const

Return a string layer with the lock of each locked development.

Returns
a string layer of locks.

◆ getThemes()

std::vector< FMTLayer< std::string > > Spatial::FMTForest::getThemes ( const std::vector< Core::FMTTheme > &  themes) const

Return one string layer per theme with the attribute value of each development.

Parameters
[in]themesthe themes to extract.
Returns
a vector of string layers, one per theme.

◆ grow()

FMTForest Spatial::FMTForest::grow ( ) const

Grow every development of the forest by one period.

Returns
a new grown forest.

◆ operator=()

FMTForest & Spatial::FMTForest::operator= ( const FMTForest rhs)

Copy assignment for FMTForest.

Parameters
[in]rhsthe FMTForest to copy.
Returns
a reference to this FMTForest.

◆ postSolve()

FMTForest Spatial::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.

Parameters
[in]filterthe mask filter to apply.
[in]originalbasethemesthe original base themes.
Returns
the postsolved forest.

◆ preSolve()

FMTForest Spatial::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.

Parameters
[in]filterthe mask filter to apply.
[in]presolvedthemesthe presolved themes.
Returns
the presolved forest.

◆ setLastThemeWithArea()

void Spatial::FMTForest::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.

Raises FMTinvalid_theme if the mask of a development is missing from the area developments.

Parameters
[in]p_devsthe actual developments holding the last theme attribute per mask subset.
[in]p_themesthe themes of the model.

◆ setPeriod()

void Spatial::FMTForest::setPeriod ( int  period)

Set the period of every development of the forest.

Parameters
[in]periodthe period to set.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

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