39 #ifndef __OPENFLUID_LANDR_LANDRGRAPH_HPP__
40 #define __OPENFLUID_LANDR_LANDRGRAPH_HPP__
42 #include <geos/planargraph/PlanarGraph.h>
44 #include <ogrsf_frmts.h>
47 namespace geos {
namespace geom {
49 class GeometryFactory;
55 namespace planargraph {
143 void addEntitiesFromGeoVector();
161 virtual LandREntity* createNewEntity(
const geos::geom::Geometry* Geom,
162 unsigned int OfldId) = 0;
169 geos::planargraph::Node* node(
const geos::geom::Coordinate& Coordinate);
201 std::map<int, LandREntity*> getEntitiesByOfldId();
206 unsigned int getSize()
const;
211 void removeUnusedNodes();
218 void addAttribute(
const std::string& AttributeName);
225 void removeAttribute(
const std::string& AttributeName);
230 std::vector<std::string> getAttributeNames();
249 bool hasAnAssociatedRaster();
261 std::vector<geos::geom::Polygon*>* rasterPolygonizedPolys();
268 virtual double getRasterValueForEntityCentroid(
const LandREntity& Entity);
275 void setAttributeFromRasterValueAtCentroid(
const std::string& AttributeName);
282 virtual void setAttributeFromMeanRasterValues(
const std::string& AttributeName)=0;
287 void computeNeighbours();
294 void exportToShp(
const std::string& FilePath,
const std::string& FileName);
304 void setAttributeFromVectorId(
const std::string& AttributeName,
306 const std::string& IdColumn,
307 const std::string& ValueColumn);
317 void setAttributeFromVectorId(
const std::string& AttributeName,
319 const std::string& IdColumn,
320 const std::string& ValueColumn);
331 virtual void setAttributeFromVectorLocation(
const std::string& AttributeName,
333 const std::string& Column,
double Thresh=0.0001);
343 virtual void setAttributeFromVectorLocation(
const std::string& AttributeName,
345 const std::string& Column,
double Thresh=0.0001);
352 virtual void removeEntity(
int OfldId)=0;
358 void snapVertices(
double snapTolerance);
Definition: GeoVectorValue.hpp:52
Interface for a graph composed of LandREntity.
Definition: LandRGraph.hpp:78
Interface for managing Vector Data format.
Definition: VectorDataset.hpp:64
Entities_t m_Entities
A list of the LandREntity of this LandRGraph.
Definition: LandRGraph.hpp:109
openfluid::landr::VectorDataset * mp_Vector
The VectorDataset associated to this LandRGraph.
Definition: LandRGraph.hpp:94
const geos::geom::GeometryFactory * mp_Factory
The geos::geom::GeometryFactory used to build this LandRGraph.
Definition: LandRGraph.hpp:99
std::map< int, LandREntity * > m_EntitiesByOfldId
A map of the LandREntity of this LandRGraph and sorted by identifier.
Definition: LandRGraph.hpp:104
std::vector< geos::geom::Polygon * > * mp_RasterPolygonizedPolys
A vector of geos::geom::Polygon representation of the RasterDataset associated to this LandRGraph...
Definition: LandRGraph.hpp:124
std::list< LandREntity * > Entities_t
Definition: LandRGraph.hpp:87
Interface for a landscape representation element.
Definition: LandREntity.hpp:63
Definition: LandRGraph.hpp:84
openfluid::landr::RasterDataset * mp_Raster
The RasterDataset associated to this LandRGraph.
Definition: LandRGraph.hpp:114
Definition: GeoRasterValue.hpp:55
static int FileNum
Definition: LandRGraph.hpp:126
#define OPENFLUID_API
Definition: dllexport.hpp:87
openfluid::landr::VectorDataset * mp_RasterPolygonized
The VectorDataset representation of the RasterDataset associated to this LandRGraph.
Definition: LandRGraph.hpp:119
GraphType
Definition: LandRGraph.hpp:82
Interface for managing Raster Data format.
Definition: RasterDataset.hpp:63