This strategy is based on Serio Rosim method, using this "mask" is possible extract a graph from a LDD image. More...
#include <LDDGraphBuilder.h>
Public Member Functions | |
LDDGraphBuilder () | |
Default constructor. More... | |
virtual | ~LDDGraphBuilder () |
Virtual destructor. More... | |
Methods | |
Methods used by this builder | |
bool | build (te::rst::Raster *raster, const std::map< std::string, std::string > &dsInfo, const std::string &graphType, const std::map< std::string, std::string > &gInfo) |
Function used to build the output graph based on input parameters. More... | |
Abstract Methods | |
Method common to each graph builder | |
std::string | getErrorMessage () |
Get error message. More... | |
boost::shared_ptr< AbstractGraph > | getGraph () |
Get generated graph. More... | |
Protected Member Functions | |
int | getEdgeId () |
Function used to generated the edge id. More... | |
bool | getVertexId (int row, int col, int &id) |
Function used to generated the vertex id based on raster coordenate. More... | |
Protected Attributes | |
std::string | m_errorMessage |
Error message. More... | |
boost::shared_ptr< AbstractGraph > | m_graph |
Graph object. More... | |
Private Attributes | |
int | m_edgeId |
Attribute used as a index counter for edge objects. More... | |
te::rst::Raster * | m_raster |
Input raster with LDD information. More... | |
This strategy is based on Serio Rosim method, using this "mask" is possible extract a graph from a LDD image.
Definition at line 75 of file LDDGraphBuilder.h.
te::graph::LDDGraphBuilder::LDDGraphBuilder | ( | ) |
|
virtual |
Virtual destructor.
Definition at line 61 of file LDDGraphBuilder.cpp.
bool te::graph::LDDGraphBuilder::build | ( | te::rst::Raster * | raster, |
const std::map< std::string, std::string > & | dsInfo, | ||
const std::string & | graphType, | ||
const std::map< std::string, std::string > & | gInfo | ||
) |
Function used to build the output graph based on input parameters.
raster | |
dsInfo | Container with data source information |
graphType | Attribute used to define the output graph type |
gInfo | Container with graph generation parameters |
Definition at line 65 of file LDDGraphBuilder.cpp.
References te::graph::Vertex::addAttribute(), te::gm::GeometryProperty::getSRID(), te::rst::Raster::getSRID(), te::graph::AbstractGraphFactory::make(), te::gm::PointType, te::common::TaskProgress::pulse(), te::graph::Vertex::setAttributeVecSize(), te::gm::GeometryProperty::setGeometryType(), te::dt::Property::setId(), te::common::TaskProgress::setMessage(), te::gm::GeometryProperty::setSRID(), te::common::TaskProgress::setTotalSteps(), TE_TR, te::common::TaskProgress::useTimer(), te::gm::Coord2D::x, and te::gm::Coord2D::y.
|
protected |
Function used to generated the edge id.
Definition at line 274 of file LDDGraphBuilder.cpp.
|
inherited |
Get error message.
Definition at line 43 of file AbstractGraphBuilder.cpp.
|
inherited |
Get generated graph.
Definition at line 48 of file AbstractGraphBuilder.cpp.
|
protected |
Function used to generated the vertex id based on raster coordenate.
row | Row position over the raster |
col | Column position over the raster |
id | Used to set the id generated |
Definition at line 252 of file LDDGraphBuilder.cpp.
|
private |
Attribute used as a index counter for edge objects.
Definition at line 134 of file LDDGraphBuilder.h.
Referenced by LDDGraphBuilder().
|
protectedinherited |
Error message.
Definition at line 84 of file AbstractGraphBuilder.h.
Referenced by te::graph::AbstractGraphBuilder::AbstractGraphBuilder().
|
protectedinherited |
Graph object.
Definition at line 82 of file AbstractGraphBuilder.h.
Referenced by te::graph::AbstractGraphBuilder::AbstractGraphBuilder().
|
private |
Input raster with LDD information.
Definition at line 132 of file LDDGraphBuilder.h.