Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
openfluid::landr::LandREntity Class Referenceabstract

Interface for a landscape representation element. More...

#include <landr/LandREntity.hpp>

Inheritance diagram for openfluid::landr::LandREntity:
Inheritance graph
[legend]
Collaboration diagram for openfluid::landr::LandREntity:
Collaboration graph
[legend]

Public Member Functions

 LandREntity (const geos::geom::Geometry *Geom, unsigned int OfldId)
 
virtual ~LandREntity ()
 
virtual LandREntityclone ()=0
 
const geos::geom::Geometry * geometry ()
 Returns the geos::geom::Geometry of this LandREntity. More...
 
unsigned int getOfldId () const
 Returns the identifier of this LandREntity. More...
 
geos::geom::Point * centroid () const
 Returns the centroid of this LandREntity. More...
 
double getArea () const
 Returns the area of this LandREntity. More...
 
double getLength () const
 Returns the length of this LandREntity. More...
 
std::set< LandREntity * > * neighbours ()
 Returns a set of LandREntity neighbours of this LandREntity. More...
 
bool getAttributeValue (const std::string &AttributeName, core::Value &Value) const
 Gets the value of an attribute. More...
 
bool setAttributeValue (const std::string &AttributeName, const core::Value *Value)
 Sets the value of an attribute. More...
 
double getDistCentroCentro (LandREntity &Other)
 Gets the distance between this LandREntity centroid and Other LandREntity centroid. More...
 
LandREntityneighbour_MinDistCentroCentro ()
 Gets the LandREntity neighbour that has the minimum centroid-to-centroid distance. More...
 

Protected Member Functions

virtual void computeNeighbours ()=0
 Computes the neighbours of this LandREntity. More...
 

Protected Attributes

const geos::geom::Geometry * mp_Geom
 The geos::geom::Geometry of this LandREntity. More...
 
unsigned int m_OfldId
 The identifier of this LandREntity. More...
 
geos::geom::Point * mp_Centroid
 The centroid of this LandREntity. More...
 
double m_Area
 The area of this LandREntity. More...
 
double m_Length
 The length of this LandREntity. More...
 
std::set< LandREntity * > * mp_Neighbours
 A set of LandREntity neighbours of this LandREntity. More...
 
std::map< std::string, core::Value * > m_Attributes
 A map of attributes of this LandREntity. More...
 

Friends

class LandRGraph
 

Detailed Description

Interface for a landscape representation element.

Constructor & Destructor Documentation

◆ LandREntity()

openfluid::landr::LandREntity::LandREntity ( const geos::geom::Geometry *  Geom,
unsigned int  OfldId 
)

◆ ~LandREntity()

virtual openfluid::landr::LandREntity::~LandREntity ( )
virtual

Member Function Documentation

◆ centroid()

geos::geom::Point* openfluid::landr::LandREntity::centroid ( ) const

Returns the centroid of this LandREntity.

◆ clone()

virtual LandREntity* openfluid::landr::LandREntity::clone ( )
pure virtual

◆ computeNeighbours()

virtual void openfluid::landr::LandREntity::computeNeighbours ( )
protectedpure virtual

Computes the neighbours of this LandREntity.

Implemented in openfluid::landr::PolygonEntity, and openfluid::landr::LineStringEntity.

◆ geometry()

const geos::geom::Geometry* openfluid::landr::LandREntity::geometry ( )

Returns the geos::geom::Geometry of this LandREntity.

◆ getArea()

double openfluid::landr::LandREntity::getArea ( ) const

Returns the area of this LandREntity.

◆ getAttributeValue()

bool openfluid::landr::LandREntity::getAttributeValue ( const std::string &  AttributeName,
core::Value Value 
) const

Gets the value of an attribute.

Parameters
AttributeNameThe name of the attribute to get.
ValueThe core::Value to assign the attribute value.
Returns
True if the attribute exists, false otherwise.

◆ getDistCentroCentro()

double openfluid::landr::LandREntity::getDistCentroCentro ( LandREntity Other)

Gets the distance between this LandREntity centroid and Other LandREntity centroid.

◆ getLength()

double openfluid::landr::LandREntity::getLength ( ) const

Returns the length of this LandREntity.

◆ getOfldId()

unsigned int openfluid::landr::LandREntity::getOfldId ( ) const

Returns the identifier of this LandREntity.

◆ neighbour_MinDistCentroCentro()

LandREntity* openfluid::landr::LandREntity::neighbour_MinDistCentroCentro ( )

Gets the LandREntity neighbour that has the minimum centroid-to-centroid distance.

◆ neighbours()

std::set<LandREntity*>* openfluid::landr::LandREntity::neighbours ( )

Returns a set of LandREntity neighbours of this LandREntity.

◆ setAttributeValue()

bool openfluid::landr::LandREntity::setAttributeValue ( const std::string &  AttributeName,
const core::Value Value 
)

Sets the value of an attribute.

Takes the ownership of Value.

Parameters
AttributeNameThe name of the attribute to set.
ValueThe core::Value assign to the attribute value.
Returns
True if the attribute exists, false otherwise.

Friends And Related Function Documentation

◆ LandRGraph

friend class LandRGraph
friend

Member Data Documentation

◆ m_Area

double openfluid::landr::LandREntity::m_Area
protected

The area of this LandREntity.

◆ m_Attributes

std::map<std::string, core::Value*> openfluid::landr::LandREntity::m_Attributes
protected

A map of attributes of this LandREntity.

◆ m_Length

double openfluid::landr::LandREntity::m_Length
protected

The length of this LandREntity.

◆ m_OfldId

unsigned int openfluid::landr::LandREntity::m_OfldId
protected

The identifier of this LandREntity.

◆ mp_Centroid

geos::geom::Point* openfluid::landr::LandREntity::mp_Centroid
protected

The centroid of this LandREntity.

◆ mp_Geom

const geos::geom::Geometry* openfluid::landr::LandREntity::mp_Geom
protected

The geos::geom::Geometry of this LandREntity.

◆ mp_Neighbours

std::set<LandREntity*>* openfluid::landr::LandREntity::mp_Neighbours
protected

A set of LandREntity neighbours of this LandREntity.


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