Interface for a landscape representation element. More...
#include <landr/LandREntity.hpp>
Public Member Functions | |
LandREntity (const geos::geom::Geometry *Geom, unsigned int OfldId) | |
virtual | ~LandREntity () |
virtual LandREntity * | clone ()=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... | |
LandREntity * | neighbour_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 |
Interface for a landscape representation element.
openfluid::landr::LandREntity::LandREntity | ( | const geos::geom::Geometry * | Geom, |
unsigned int | OfldId | ||
) |
|
virtual |
geos::geom::Point* openfluid::landr::LandREntity::centroid | ( | ) | const |
Returns the centroid of this LandREntity.
|
pure virtual |
Implemented in openfluid::landr::PolygonEntity, and openfluid::landr::LineStringEntity.
|
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.
AttributeName | The name of the attribute to get. |
Value | The core::Value to assign the attribute value. |
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.
AttributeName | The name of the attribute to set. |
Value | The core::Value assign to the attribute value. |
|
friend |
|
protected |
The area of this LandREntity.
|
protected |
A map of attributes of this LandREntity.
|
protected |
The length of this LandREntity.
|
protected |
The identifier of this LandREntity.
|
protected |
The centroid of this LandREntity.
|
protected |
The geos::geom::Geometry of this LandREntity.
|
protected |
A set of LandREntity neighbours of this LandREntity.