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

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

Member Function Documentation

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

Returns the centroid of this LandREntity.

virtual LandREntity* openfluid::landr::LandREntity::clone ( )
pure virtual
virtual void openfluid::landr::LandREntity::computeNeighbours ( )
protectedpure virtual

Computes the neighbours of this LandREntity.

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

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

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

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

Returns the area of this LandREntity.

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.
double openfluid::landr::LandREntity::getDistCentroCentro ( LandREntity Other)

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

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

Returns the length of this LandREntity.

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

Returns the identifier of this LandREntity.

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

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

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

Returns a set of LandREntity neighbours of this LandREntity.

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

friend class LandRGraph
friend

Member Data Documentation

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

The area of this LandREntity.

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

A map of attributes of this LandREntity.

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

The length of this LandREntity.

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

The identifier of this LandREntity.

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

The centroid of this LandREntity.

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

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

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: