This class defines the Flow strategy to build a graph.  
 More...
#include <FlowGraphBuilder.h>
 | 
Methods used by this builder  
 | 
| int  | m_edgeId | 
|   | Attribute used as a index counter for edge objects.  
  | 
|   | 
| bool  | build (const std::string &shapeFileName, const std::string &linkColumn, const int &srid, const std::string &csvFileName, const int &fromIdx, const int &toIdx, const int &weightIdx, const 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.  
  | 
|   | 
| int  | getEdgeId () | 
|   | Function used to generated the edge id.  
  | 
|   | 
| std::unique_ptr< te::da::DataSource >  | getDataSource (const std::string fileName) | 
|   | Function used to get the data source with the vectorial data.  
  | 
|   | 
| std::unique_ptr< te::da::DataSet >  | getDataSet (te::da::DataSource *ds) | 
|   | Function used to get the data set with the vectorial data.  
  | 
|   | 
| boost::ptr_vector< te::dt::Property >  | getProperties (te::da::DataSource *ds) | 
|   | Function used to get the data source properties.  
  | 
|   | 
| bool  | createVertexObjects (const std::string &shapeFileName, const std::string &linkColumn, const int &srid) | 
|   | Function used to create all vertex object based on vectorial data.  
  | 
|   | 
| bool  | createEdgeObjects (const std::string &csvFileName, const int &fromIdx, const int &toIdx, const int &weightIdx) | 
|   | Function used to create all edges object based on flow table data.  
  | 
|   | 
This class defines the Flow strategy to build a graph. 
   This function needs a vectorial data and table with flow information,
   this table must have the origin and destination info about each flow.
 - Note
 - For now the the shapefile must have only polygon geometries and the flow table must be a CSV file.
 
- See also
 - AbstractGraphBuilder 
 
Definition at line 76 of file FlowGraphBuilder.h.
 
◆ FlowGraphBuilder()
      
        
          | te::graph::FlowGraphBuilder::FlowGraphBuilder  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ ~FlowGraphBuilder()
  
  
      
        
          | virtual te::graph::FlowGraphBuilder::~FlowGraphBuilder  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
◆ build()
      
        
          | bool te::graph::FlowGraphBuilder::build  | 
          ( | 
          const std::string &  | 
          shapeFileName,  | 
        
        
           | 
           | 
          const std::string &  | 
          linkColumn,  | 
        
        
           | 
           | 
          const int &  | 
          srid,  | 
        
        
           | 
           | 
          const std::string &  | 
          csvFileName,  | 
        
        
           | 
           | 
          const int &  | 
          fromIdx,  | 
        
        
           | 
           | 
          const int &  | 
          toIdx,  | 
        
        
           | 
           | 
          const int &  | 
          weightIdx,  | 
        
        
           | 
           | 
          const 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. 
- Parameters
 - 
  
    | shapeFileName | File name wiht vectorial data  | 
    | linkColumn | Column name from vectorial data used as link column  | 
    | srid | Vectorial projection id  | 
    | csvFileName | CSV File name with flow data  | 
    | fromIdx | Index for column table with origin information.  | 
    | toIdx | Index for column table with destiny information.  | 
    | weightIdx | Index for column table with weight information.  | 
    | dsInfo | The necessary information to access the data source.  | 
    | graphType | Attribute used to define the output graph type  | 
    | gInfo | Container with graph generation parameters | 
  
   
- Returns
 - True if the graph was correctly generated and false in other case. 
 
 
 
◆ createEdgeObjects()
  
  
      
        
          | bool te::graph::FlowGraphBuilder::createEdgeObjects  | 
          ( | 
          const std::string &  | 
          csvFileName,  | 
         
        
           | 
           | 
          const int &  | 
          fromIdx,  | 
         
        
           | 
           | 
          const int &  | 
          toIdx,  | 
         
        
           | 
           | 
          const int &  | 
          weightIdx  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Function used to create all edges object based on flow table data. 
- Parameters
 - 
  
    | csvFileName | CSV File name with flow data  | 
    | fromIdx | Index for column table with origin information.  | 
    | toIdx | Index for column table with destiny information.  | 
    | weightIdx | Index for column table with weight information. | 
  
   
- Returns
 - True if the edges was created correctly and false in othe case 
 
 
 
◆ createVertexObjects()
  
  
      
        
          | bool te::graph::FlowGraphBuilder::createVertexObjects  | 
          ( | 
          const std::string &  | 
          shapeFileName,  | 
         
        
           | 
           | 
          const std::string &  | 
          linkColumn,  | 
         
        
           | 
           | 
          const int &  | 
          srid  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Function used to create all vertex object based on vectorial data. 
- Parameters
 - 
  
    | shapeFileName | File name wiht vectorial data  | 
    | linkColumn | Column name from vectorial data used as link column  | 
    | srid | Vectorial projection id | 
  
   
- Returns
 - True if the vertexs was created correctly and false in othe case 
 
 
 
◆ getDataSet()
Function used to get the data set with the vectorial data. 
- Returns
 - Data set. 
 
 
 
◆ getDataSource()
  
  
      
        
          | std::unique_ptr< te::da::DataSource > te::graph::FlowGraphBuilder::getDataSource  | 
          ( | 
          const std::string  | 
          fileName | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Function used to get the data source with the vectorial data. 
- Returns
 - Data source. 
 
 
 
◆ getEdgeId()
  
  
      
        
          | int te::graph::FlowGraphBuilder::getEdgeId  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Function used to generated the edge id. 
- Returns
 - Integer value as ID 
 
 
 
◆ getErrorMessage()
  
  
      
        
          | std::string te::graph::AbstractGraphBuilder::getErrorMessage  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ getGraph()
  
  
      
        
          | boost::shared_ptr< AbstractGraph > te::graph::AbstractGraphBuilder::getGraph  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
◆ getProperties()
Function used to get the data source properties. 
- Returns
 - A vector with all properties from a data source 
 
 
 
◆ m_edgeId
  
  
      
        
          | int te::graph::FlowGraphBuilder::m_edgeId | 
         
       
   | 
  
private   | 
  
 
 
◆ m_errorMessage
  
  
      
        
          | std::string te::graph::AbstractGraphBuilder::m_errorMessage | 
         
       
   | 
  
protectedinherited   | 
  
 
 
◆ m_graph
  
  
      
        
          | boost::shared_ptr<AbstractGraph> te::graph::AbstractGraphBuilder::m_graph | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/graph/builder/FlowGraphBuilder.h