All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
openfluid::landr::LandREntity Class Reference

Interface for a landscape representation element. More...

#include <landr/LandREntity.hpp>

Inheritance diagram for openfluid::landr::LandREntity:
openfluid::landr::LineStringEntity openfluid::landr::PolygonEntity

List of all members.

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

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 
)

Member Function Documentation

virtual void openfluid::landr::LandREntity::computeNeighbours ( ) [protected, pure virtual]

Computes the neighbours of this LandREntity.

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

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.
geos::geom::Point* openfluid::landr::LandREntity::getCentroid ( ) const

Returns the centroid of this LandREntity.

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

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

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

Returns the length of this LandREntity.

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

Returns a set of LandREntity neighbours of this LandREntity.

Returns the identifier 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

The area of this LandREntity.

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

A map of attributes of this LandREntity.

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.

A set of LandREntity neighbours of this LandREntity.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines