40 #ifndef __OPENFLUID_LANDR_LINESTRINGGRAPH_HPP__
41 #define __OPENFLUID_LANDR_LINESTRINGGRAPH_HPP__
57 #define DECLARE_ENTITIES_GRAPH_LOOP(loopid) \
58 std::list<openfluid::landr::LandREntity*>::iterator _M_##loopid##_it;\
59 std::list<openfluid::landr::LandREntity*> _M_##loopid##_uvect; \
66 #define DECLARE_ENTITIES_ORDERED_LOOP(loopid) \
67 std::list<openfluid::landr::LandREntity*>::iterator _M_##loopid##_it;\
68 std::list<openfluid::landr::LandREntity*> _M_##loopid##_uvect; \
76 #define BEGIN_ENTITIES_GRAPH_LOOP(loopid,graph,entity) \
79 _M_##loopid##_uvect = graph->getEntities();\
80 for (_M_##loopid##_it=_M_##loopid##_uvect.begin();\
81 _M_##loopid##_it != _M_##loopid##_uvect.end(); ++_M_##loopid##_it) \
83 entity = dynamic_cast<openfluid::landr::LineStringEntity*>(*_M_##loopid##_it); \
91 #define BEGIN_ENTITIES_ORDERED_LOOP(loopid,graph,entity) \
94 _M_##loopid##_uvect = graph->getOfldIdOrderedEntities();\
95 for (_M_##loopid##_it=_M_##loopid##_uvect.begin();\
96 _M_##loopid##_it != _M_##loopid##_uvect.end(); ++_M_##loopid##_it) \
98 entity = dynamic_cast<openfluid::landr::LineStringEntity*>(*_M_##loopid##_it); \
112 namespace openfluid {
namespace landr {
152 virtual LandREntity* createNewEntity(
const geos::geom::Geometry* Geom,
unsigned int OfldId);
193 virtual void removeEntity(
int OfldId);
206 std::vector<LineStringEntity*> getEndLineStringEntities();
212 std::vector<LineStringEntity*> getStartLineStringEntities();
233 void setAttributeFromRasterValueAtStartNode(
const std::string& AttributeName);
240 void setAttributeFromRasterValueAtEndNode(
const std::string& AttributeName);
252 bool isLineStringGraphArborescence();
259 virtual void setAttributeFromMeanRasterValues(
const std::string& AttributeName);
276 std::multimap<double,LineStringEntity*> getLineStringEntitiesByMinLength(
double MinLength,
278 bool HighDegree=
true);
285 void setOrientationByOfldId(
int OfldId);
292 void mergeLineStringEntitiesByMinLength(
double MinLength,
bool rmDangle=
true);
Definition: GeoVectorValue.hpp:52
Interface for a landscape representation element.
Definition: LandREntity.hpp:69
GraphType
Definition: LandRGraph.hpp:87
#define OPENFLUID_API
Definition: dllexport.hpp:87
Interface for managing Vector Data format.
Definition: VectorDataset.hpp:64
A LandRGraph composed of LineStringEntities.
Definition: LineStringGraph.hpp:120
std::list< LandREntity * > Entities_t
Definition: LandRGraph.hpp:92
Interface for a graph composed of LandREntity.
Definition: LandRGraph.hpp:83
A LandREntity representing a geos::geom::LineString.
Definition: LineStringEntity.hpp:60