FMT 0.9.8
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Spatial::FMTlayer< T > Class Template Reference

#include <FMTlayer.hpp>

Inheritance diagram for Spatial::FMTlayer< T >:
[legend]
Collaboration diagram for Spatial::FMTlayer< T >:
[legend]

Public Types

typedef std::map< FMTcoordinate, T >::value_type value_type
 Value typedef of the FMTlayer.
 
typedef std::map< FMTcoordinate, T >::iterator iterator
 Iterator typedef of the FMTlayer.
 
typedef std::map< FMTcoordinate, T >::const_iterator const_iterator
 Const_Iterator typedef of the FMTlist.
 

Public Member Functions

T & operator[] (const FMTcoordinate &coordinate)
 
const T & at (const FMTcoordinate &coordinate) const
 
bool empty () const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator find (const FMTcoordinate &coordinate) const
 
iterator find (const FMTcoordinate &coordinate)
 
 FMTlayer ()
 
virtual ~FMTlayer ()=default
 
 FMTlayer (FMTlayer &&rhs) noexcept
 
 FMTlayer (const std::vector< double > &lgeotransform, const unsigned int &lmaxx, const unsigned int &lmaxy, const std::string &lSRS_WKT, const double &lcellsize)
 
 FMTlayer (const std::map< FMTcoordinate, T > &lmapping, const std::vector< double > &lgeotransform, const unsigned int &lmaxx, const unsigned int &lmaxy, const std::string &lSRS_WKT, const double &lcellsize)
 
 FMTlayer (const FMTlayer &rhs)
 
FMTlayer< T > & operator= (const FMTlayer< T > &rhs)
 
void swap (FMTlayer< T > &rhs)
 
void setextentfrom (const FMTlayer< T > &rhs)
 
template<typename newtype >
FMTlayer< newtype > copyextent () const
 
FMTlayer< T > & operator+= (const FMTlayer< T > &rhs)
 
unsigned int GetXSize () const
 
unsigned int GetYSize () const
 
std::vector< double > getgeotransform () const
 
std::string getprojection () const
 
std::map< FMTcoordinate, T > getmapping () const
 
double area () const
 
double getcellsize () const
 
std::vector< T > getattributes () const
 
size_t size () const
 
void replace (typename std::map< FMTcoordinate, T >::const_iterator first, typename std::map< FMTcoordinate, T >::const_iterator last)
 
FMTlayer< std::string > & operator+= (const FMTlayer< std::string > &rhs)
 
- Public Member Functions inherited from Core::FMTobject
 FMTobject ()
 
virtual ~FMTobject ()
 
 FMTobject (const std::shared_ptr< Exception::FMTexceptionhandler > exhandler)
 
 FMTobject (const FMTobject &rhs)
 
FMTobjectoperator= (const FMTobject &rhs)
 
virtual void passinlogger (const std::shared_ptr< Logging::FMTlogger > &logger)
 
void passinexceptionhandler (const std::shared_ptr< Exception::FMTexceptionhandler > &exhandler)
 
void redirectlogtofile (const std::string &location)
 
virtual void setdefaultlogger ()
 
virtual void setquietlogger ()
 
virtual void settasklogger ()
 
virtual void setdebuglogger ()
 
void setdefaultexceptionhandler ()
 
void setquietexceptionhandler ()
 
void setdebugexceptionhandler ()
 
void setfreeexceptionhandler ()
 
void disablenestedexceptions ()
 
void enablenestedexceptions ()
 
void seterrorstowarnings (const std::vector< Exception::FMTexc > &errors)
 
void setmaxwarningsbeforesilenced (const size_t &maxwarningcount)
 

Protected Attributes

std::vector< double > geotransform
 Geotransform of the map (see GDAL for more information about Geotransform)
 
unsigned int maxx
 Maximal x value in the map.
 
unsigned int maxy
 Maximal y value in the map.
 
std::string SRS_WKT
 Projection string of the raster (see GDAL for more information about Geotransform)
 
double cellsize
 Size of the pixel in the unit used by the map (SRS_WKT)
 
std::map< FMTcoordinate, T > mapping
 std::map keeping the information of each pixel.
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Static Public Member Functions inherited from Core::FMTobject
static std::string getruntimelocation ()
 
static unsigned long long getavailablememory ()
 
- Protected Member Functions inherited from Core::FMTobject
template<class Archive >
void forcesave (Archive &ar, const unsigned int version) const
 
template<class Archive >
void forceload (Archive &ar, const unsigned int version)
 
void checksignals () const
 
void setCPLhandler ()
 
- Static Protected Member Functions inherited from Core::FMTobject
static std::chrono::time_point< std::chrono::high_resolution_clock > getclock ()
 
template<class chrono >
static double getduration (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
static std::string getdurationinseconds (const std::chrono::time_point< std::chrono::high_resolution_clock > &startclock)
 
- Static Protected Attributes inherited from Core::FMTobject
static std::shared_ptr< Exception::FMTexceptionhandler_exhandler
 A shared pointer to the exception handler.
 
static std::shared_ptr< Logging::FMTlogger_logger
 A shared pointer to the logger.
 

Detailed Description

template<typename T>
class Spatial::FMTlayer< T >

FMTlayer is a simple template class made to be used like a single raster file. It hold the coordinates of each pixel using a map, it also have information about the projection of the raster. It is mostly generated using the FMTareaparser.

Member Typedef Documentation

◆ const_iterator

template<typename T >
typedef std::map<FMTcoordinate,T>::const_iterator Spatial::FMTlayer< T >::const_iterator

Const_Iterator typedef of the FMTlist.

◆ iterator

template<typename T >
typedef std::map<FMTcoordinate,T>::iterator Spatial::FMTlayer< T >::iterator

Iterator typedef of the FMTlayer.

◆ value_type

template<typename T >
typedef std::map<FMTcoordinate,T>::value_type Spatial::FMTlayer< T >::value_type

Value typedef of the FMTlayer.

Constructor & Destructor Documentation

◆ FMTlayer() [1/5]

template<typename T >
Spatial::FMTlayer< T >::FMTlayer ( )
inline

Default constructor for FMTlayer.

◆ ~FMTlayer()

template<typename T >
virtual Spatial::FMTlayer< T >::~FMTlayer ( )
default

Default destructor for FMTlayer.

◆ FMTlayer() [2/5]

template<typename T >
Spatial::FMTlayer< T >::FMTlayer ( FMTlayer< T > &&  rhs)
inlinenoexcept

Default move constructor for FMTlayer.

◆ FMTlayer() [3/5]

template<typename T >
Spatial::FMTlayer< T >::FMTlayer ( const std::vector< double > &  lgeotransform,
const unsigned int &  lmaxx,
const unsigned int &  lmaxy,
const std::string &  lSRS_WKT,
const double &  lcellsize 
)
inline

Constructor for the FMTlayer taking a geotransform, max x, max y, projection string and cell size.

◆ FMTlayer() [4/5]

template<typename T >
Spatial::FMTlayer< T >::FMTlayer ( const std::map< FMTcoordinate, T > &  lmapping,
const std::vector< double > &  lgeotransform,
const unsigned int &  lmaxx,
const unsigned int &  lmaxy,
const std::string &  lSRS_WKT,
const double &  lcellsize 
)
inline

Constructor for the FMTlayer used to copy information from an other layer.

◆ FMTlayer() [5/5]

template<typename T >
Spatial::FMTlayer< T >::FMTlayer ( const FMTlayer< T > &  rhs)
inline

Default copy constructor for FMTlayer.

Member Function Documentation

◆ area()

template<typename T >
double Spatial::FMTlayer< T >::area ( ) const
inline

Returns the whole area of the FMTlayer using the size of a pixel.

◆ at()

template<typename T >
const T & Spatial::FMTlayer< T >::at ( const FMTcoordinate coordinate) const
inline

At for FMTlayer accessing std::map (mapping).

◆ begin() [1/2]

template<typename T >
iterator Spatial::FMTlayer< T >::begin ( )
inline

Returns an iterator at the beginning of the FMTlayer.

◆ begin() [2/2]

template<typename T >
const_iterator Spatial::FMTlayer< T >::begin ( ) const
inline

Returns an const iterator at the beginning of the FMTlayer.

◆ copyextent()

template<typename T >
template<typename newtype >
FMTlayer< newtype > Spatial::FMTlayer< T >::copyextent ( ) const
inline

Create a new FMTlayer by copying informations (other than the main map) to a new FMTlayer from this.

◆ empty()

template<typename T >
bool Spatial::FMTlayer< T >::empty ( ) const
inline

Check if the FMTlayer is empty.

◆ end() [1/2]

template<typename T >
iterator Spatial::FMTlayer< T >::end ( )
inline

Returns an iterator at the end of the FMTlayer.

◆ end() [2/2]

template<typename T >
const_iterator Spatial::FMTlayer< T >::end ( ) const
inline

Returns an const iterator at the end of the FMTlayer.

◆ find() [1/2]

template<typename T >
iterator Spatial::FMTlayer< T >::find ( const FMTcoordinate coordinate)
inline

Find the layer element at a given coordinate.

◆ find() [2/2]

template<typename T >
const_iterator Spatial::FMTlayer< T >::find ( const FMTcoordinate coordinate) const
inline

Find the layer element at a given coordinate.

◆ getattributes()

template<typename T >
std::vector< T > Spatial::FMTlayer< T >::getattributes ( ) const
inline

Returns a vector of unique attributes present in the FMTlayer.

◆ getcellsize()

template<typename T >
double Spatial::FMTlayer< T >::getcellsize ( ) const
inline

Get the cell size for a single coordinate of the map.

◆ getgeotransform()

template<typename T >
std::vector< double > Spatial::FMTlayer< T >::getgeotransform ( ) const
inline

Returns the geotransform of the layer.

◆ getmapping()

template<typename T >
std::map< FMTcoordinate, T > Spatial::FMTlayer< T >::getmapping ( ) const
inline

Returns the underlying map of the FMTlayer.

◆ getprojection()

template<typename T >
std::string Spatial::FMTlayer< T >::getprojection ( ) const
inline

Returns the projection of the FMTlayer.

◆ GetXSize()

template<typename T >
unsigned int Spatial::FMTlayer< T >::GetXSize ( ) const
inline

Returns the maximal x value of the FMTlayer.

◆ GetYSize()

template<typename T >
unsigned int Spatial::FMTlayer< T >::GetYSize ( ) const
inline

Returns the maximal y value of the FMTlayer.

◆ operator+=() [1/2]

FMTlayer< std::string > & Spatial::FMTlayer< std::string >::operator+= ( const FMTlayer< std::string > &  rhs)
inline

◆ operator+=() [2/2]

template<typename T >
FMTlayer< T > & Spatial::FMTlayer< T >::operator+= ( const FMTlayer< T > &  rhs)
inline

Template specification for adding strings from a layer to a string layer using std::string operator+=.

◆ operator=()

template<typename T >
FMTlayer< T > & Spatial::FMTlayer< T >::operator= ( const FMTlayer< T > &  rhs)
inline

Default copy assignment for FMTlayer.

◆ operator[]()

template<typename T >
T & Spatial::FMTlayer< T >::operator[] ( const FMTcoordinate coordinate)
inline

Operator [] for FMTlayer accessing std::map (mapping).

◆ replace()

template<typename T >
void Spatial::FMTlayer< T >::replace ( typename std::map< FMTcoordinate, T >::const_iterator  first,
typename std::map< FMTcoordinate, T >::const_iterator  last 
)
inline

Replaces values of a layer using iterators coming from an other FMTlayer.

◆ setextentfrom()

template<typename T >
void Spatial::FMTlayer< T >::setextentfrom ( const FMTlayer< T > &  rhs)
inline

Using an other layer (rhs) it's going to set the informations (other than the main map) to this.

◆ size()

template<typename T >
size_t Spatial::FMTlayer< T >::size ( ) const
inline

Returns the size of the FMTlayer.

◆ swap()

template<typename T >
void Spatial::FMTlayer< T >::swap ( FMTlayer< T > &  rhs)
inline

Swap operator for FMTlayer.

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename T >
friend class boost::serialization::access
friend

Member Data Documentation

◆ cellsize

template<typename T >
double Spatial::FMTlayer< T >::cellsize
protected

Size of the pixel in the unit used by the map (SRS_WKT)

◆ geotransform

template<typename T >
std::vector<double> Spatial::FMTlayer< T >::geotransform
protected

Geotransform of the map (see GDAL for more information about Geotransform)

◆ mapping

template<typename T >
std::map<FMTcoordinate, T> Spatial::FMTlayer< T >::mapping
protected

std::map keeping the information of each pixel.

◆ maxx

template<typename T >
unsigned int Spatial::FMTlayer< T >::maxx
protected

Maximal x value in the map.

◆ maxy

template<typename T >
unsigned int Spatial::FMTlayer< T >::maxy
protected

Maximal y value in the map.

◆ SRS_WKT

template<typename T >
std::string Spatial::FMTlayer< T >::SRS_WKT
protected

Projection string of the raster (see GDAL for more information about Geotransform)


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