39 #ifndef LINESTRINGGRAPH_HPP_
40 #define LINESTRINGGRAPH_HPP_
52 #define DECLARE_ENTITIES_GRAPH_LOOP(loopid) \
53 std::list<openfluid::landr::LandREntity*>::iterator _M_##loopid##_it;\
54 std::list<openfluid::landr::LandREntity*> _M_##loopid##_uvect; \
61 #define DECLARE_ENTITIES_ORDERED_LOOP(loopid) \
62 std::list<openfluid::landr::LandREntity*>::iterator _M_##loopid##_it;\
63 std::list<openfluid::landr::LandREntity*> _M_##loopid##_uvect; \
71 #define BEGIN_ENTITIES_GRAPH_LOOP(loopid,graph,entity) \
74 _M_##loopid##_uvect = graph->getEntities();\
75 for (_M_##loopid##_it=_M_##loopid##_uvect.begin(); _M_##loopid##_it != _M_##loopid##_uvect.end(); ++_M_##loopid##_it) \
77 entity = dynamic_cast<openfluid::landr::LineStringEntity*>(*_M_##loopid##_it); \
85 #define BEGIN_ENTITIES_ORDERED_LOOP(loopid,graph,entity) \
88 _M_##loopid##_uvect = graph->getOfldIdOrderedEntities();\
89 for (_M_##loopid##_it=_M_##loopid##_uvect.begin(); _M_##loopid##_it != _M_##loopid##_uvect.end(); ++_M_##loopid##_it) \
91 entity = dynamic_cast<openfluid::landr::LineStringEntity*>(*_M_##loopid##_it); \
100 namespace openfluid {
namespace landr {
138 virtual LandREntity* getNewEntity(
const geos::geom::Geometry* Geom,
139 unsigned int OfldId);
180 virtual void removeEntity(
int OfldId);
192 std::vector<LineStringEntity*> getEndLineStringEntities();
197 std::vector<LineStringEntity*> getStartLineStringEntities();
218 void setAttributeFromRasterValueAtStartNode(
const std::string& AttributeName);
225 void setAttributeFromRasterValueAtEndNode(
const std::string& AttributeName);
237 bool isLineStringGraphArborescence();
244 virtual void setAttributeFromMeanRasterValues(
const std::string& AttributeName);
263 std::multimap<double, LineStringEntity*> getLineStringEntitiesByMinLength(
double MinLength,
265 bool HighDegree=
true);
272 void setOrientationByOfldId(
int OfldId);
Interface for managing Vector Data format.
Definition: VectorDataset.hpp:65
A LandRGraph composed of LineStringEntities.
Definition: LineStringGraph.hpp:107
GraphType
Definition: LandRGraph.hpp:82
Interface for a landscape representation element.
Definition: LandREntity.hpp:63
Interface for a graph composed of LandREntity.
Definition: LandRGraph.hpp:78
std::list< LandREntity * > Entities_t
Definition: LandRGraph.hpp:87
Container class for geospatial vector data, represented by an OGR datasource.
Definition: GeoVectorValue.hpp:54
A LandREntity representing a geos::geom::LineString.
Definition: LineStringEntity.hpp:57
#define DLLEXPORT
Definition: dllexport.hpp:51