SpatialWeightsExchanger.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file SpatialWeightsExchanger.cpp
22 
23  \brief This class defines functions used to load and save graphs using GAL and GWT formats,
24  both formats use a ' ' as separator.
25 
26  GAL FORMAT
27 
28  0 NUMBER_OBSERVATIONS DATASET_NAME ATTRIBUTE_ID_NAME (HEADER LINE)
29  OBSERVATION_ID NUMBER_NEIGHBOURS
30  NEIGHBOURS_1 NEIGHBOURS_2 ... NEIGHBOURS_N
31  OBSERVATION_ID NUMBER_NEIGHBOURS
32  NEIGHBOURS_1 NEIGHBOURS_2 ... NEIGHBOURS_N
33  ...
34 
35 
36  GWT FORMAT
37 
38  0 NUMBER_OBSERVATIONS DATASET_NAME ATTRIBUTE_ID_NAME (HEADER LINE)
39  OBSERVATION_ID_FROM OBSERVATION_ID_TO DISTANCE
40  OBSERVATION_ID_FROM OBSERVATION_ID_TO DISTANCE
41  OBSERVATION_ID_FROM OBSERVATION_ID_TO DISTANCE
42  ...
43 */
44 
45 //Terralib Includes
46 #include "../../common/Exception.h"
47 #include "../../core/encoding/CharEncoding.h"
48 #include "../../core/translator/Translator.h"
49 #include "../../common/progress/TaskProgress.h"
50 #include "../../dataaccess/datasource/DataSource.h"
51 #include "../../dataaccess/utils/Utils.h"
52 #include "../../datatype/SimpleData.h"
53 #include "../../datatype/SimpleProperty.h"
54 #include "../../geometry/GeometryProperty.h"
55 #include "../../geometry/MultiPolygon.h"
56 #include "../../geometry/Point.h"
57 #include "../../geometry/Polygon.h"
58 #include "../../graph/core/AbstractGraph.h"
59 #include "../../graph/core/AbstractGraphFactory.h"
60 #include "../../graph/core/GraphMetadata.h"
61 #include "../../graph/core/Edge.h"
62 #include "../../graph/core/Vertex.h"
63 #include "../../graph/iterator/AbstractIterator.h"
64 #include "../../graph/iterator/SequenceIterator.h"
65 #include "../../graph/iterator/MemoryIterator.h"
66 #include "../../graph/Globals.h"
69 
70 //STL Includes
71 #include <cassert>
72 #include <fstream>
73 #include <iosfwd>
74 #include <stdio.h>
75 
76 // BOOST Includes
77 #include<boost/tokenizer.hpp>
78 
80 {
81 }
82 
84 
86 {
87  //get iterator
88  std::unique_ptr<te::graph::AbstractIterator> it;
89 
91 
92  if(g->getMetadata()->getDataSource())
93  {
94  it.reset(new te::graph::SequenceIterator(g));
95  }
96  else
97  {
98  it.reset(new te::graph::MemoryIterator(g));
99  }
100 
101  assert(it.get());
102 
103  //create file
104  FILE* fp = fopen(te::core::CharEncoding::fromUTF8(pathFileName).c_str(), "w");
105 
106  assert(fp);
107 
108  //write header info
109  if(gpm->getDataSetName().empty())
110  {
111  fprintf(fp, "%d\n", (int)it->getVertexInteratorCount());
112  }
113  else
114  {
115  fprintf(fp, "0 %d %s %s\n", (int)it->getVertexInteratorCount(), gpm->getDataSetName().c_str(), gpm->getAttributeName().c_str());
116  }
117 
118  //create task
120 
121  task.setTotalSteps(static_cast<int>(it->getVertexInteratorCount()));
122  task.setMessage(TE_TR("Export to GAL Format."));
123 
124  //write body info
125  te::graph::Vertex* v = it->getFirstVertex();
126 
127  while(it->isVertexIteratorAfterEnd() == false)
128  {
129  int id = v->getId();
130  std::set<int> neighbours = v->getSuccessors();
131  std::set<int>::iterator itNeighbours = neighbours.begin();
132 
133  if(!neighbours.empty())
134  {
135  fprintf(fp, "%d %d\n", id, (int)neighbours.size());
136 
137  while(itNeighbours != neighbours.end())
138  {
139  te::graph::Edge* e = g->getEdge(*itNeighbours);
140 
141  if(e)
142  {
143  if(e->getIdFrom() == id)
144  fprintf (fp, "%d ", e->getIdTo());
145  else
146  fprintf (fp, "%d ", e->getIdFrom());
147  }
148 
149  ++itNeighbours;
150  }
151 
152  fprintf (fp, "\n");
153  }
154 
155  if(!task.isActive())
156  {
157  fclose(fp);
158 
159  throw te::common::Exception(TE_TR("Operation canceled by the user."));
160  }
161 
162  task.pulse();
163 
164  v = it->getNextVertex();
165  }
166 
167  fclose(fp);
168 }
169 
171 {
172  //open file
173  std::ifstream file(pathFileName.c_str());
174 
175  if(file.is_open() == false)
176  return nullptr;
177 
178  int count = (int)std::count(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>(), '\n');
179 
180  file.clear();
181  file.seekg(0, std::ios::beg);
182 
183  //create output gpm
185 
186  // graph type
188 
189  // connection info
190  const std::string connInfo("memory:");
191 
192  // graph information
193  std::map<std::string, std::string> graphInfo;
194  graphInfo["GRAPH_DATA_SOURCE_TYPE"] = "MEM";
195  graphInfo["GRAPH_NAME"] = "gpm_gal_graph";
196  graphInfo["GRAPH_DESCRIPTION"] = "Generated by Spatial Weights Exchanger.";
197 
198  //create output graph
199  gpm->setGraph(te::graph::AbstractGraphFactory::make(graphType, connInfo, graphInfo));
200 
201  te::graph::AbstractGraph* graph = gpm->getGraph();
202  assert(graph);
203 
204  //create boost tokenizer
205  typedef boost::tokenizer< boost::escaped_list_separator<char> > Tokenizer;
206  boost::escaped_list_separator<char> sep('\\', ' ', '\"');
207 
208  std::vector<std::string> line;
209  std::string buffer;
210 
211  //get header line
212  std::getline(file, buffer);
213  Tokenizer tok(buffer, sep);
214  line.assign(tok.begin(), tok.end());
215 
216  std::string dataSetName;
217  std::string attributeName;
218  bool associateGeom = false;
219 
220  if(line.size() == 4 && ds) // has the number of observations and data set information
221  {
222  associateGeom = true;
223 
224  dataSetName = line[2];
225  attributeName = line[3];
226 
227  gpm->setDataSetName(dataSetName);
228  gpm->setAttributeName(attributeName);
229  }
230 
231  //create task
233 
234  task.setTotalSteps(count);
235  task.setMessage(TE_TR("Import from GAL Format."));
236 
237  //access each line of the gat file
238  m_edgeId = 0;
239 
240  while(std::getline(file, buffer))
241  {
242  line.clear();
243  Tokenizer tok(buffer, sep);
244  line.assign(tok.begin(), tok.end());
245 
246  std::string vertexIdStr, nNeighboursStr;
247 
248  try
249  {
250  vertexIdStr = line[0];
251  nNeighboursStr = line[1];
252  }
253  catch(...)
254  {
255  delete graph;
256 
257  return nullptr;
258  }
259 
260  //create vertex
261  int vId = atoi(vertexIdStr.c_str());
262  te::graph::Vertex* v = graph->getVertex(vId);
263 
264  if(!v)
265  {
266  v = new te::graph::Vertex(vId);
267  graph->add(v);
268  }
269 
270  //get new line in gal file
271  std::getline(file, buffer);
272  line.clear();
273  Tokenizer tok2(buffer, sep);
274  line.assign(tok2.begin(), tok2.end());
275 
276  //get neighbours
277  int nNeighbours = atoi(nNeighboursStr.c_str());
278 
279  try
280  {
281  for(int i = 0; i < nNeighbours; ++i)
282  {
283  std::string vNeighbourStr = line[i];
284  int vNeighbourId = atoi(vNeighbourStr.c_str());
285 
286  //add vertex neighbour
287  te::graph::Vertex* vNeighbour = graph->getVertex(vNeighbourId);
288 
289  if(!vNeighbour)
290  {
291  vNeighbour = new te::graph::Vertex(vNeighbourId);
292  graph->add(vNeighbour);
293  }
294 
295  //create edge
296  int id = getEdgeId();
297 
298  te::graph::Edge* e = new te::graph::Edge(id, vId, vNeighbourId);
299  graph->add(e);
300  }
301  }
302  catch(...)
303  {
304  delete graph;
305 
306  return nullptr;
307  }
308 
309  if(!task.isActive())
310  {
311  file.close();
312 
313  throw te::common::Exception(TE_TR("Operation canceled by the user."));
314  }
315 
316  task.pulse();
317  }
318 
319  file.close();
320 
321  if(associateGeom)
322  associateGeometry(gpm, ds);
323 
324  return gpm;
325 }
326 
327 void te::sa::SpatialWeightsExchanger::exportToGWT(te::sa::GeneralizedProximityMatrix* gpm, std::string pathFileName, int distAttrIdx)
328 {
330 
331  //get iterator
332  std::unique_ptr<te::graph::AbstractIterator> it;
333 
334  if(g->getMetadata()->getDataSource())
335  {
336  it.reset(new te::graph::SequenceIterator(g));
337  }
338  else
339  {
340  it.reset(new te::graph::MemoryIterator(g));
341  }
342 
343  assert(it.get());
344 
345  //create file
346  FILE* fp = fopen(te::core::CharEncoding::fromUTF8(pathFileName).c_str(), "w");
347 
348  assert(fp);
349 
350  //write header info
351  if(gpm->getDataSetName().empty())
352  {
353  fprintf(fp, "%d\n", (int)it->getEdgeInteratorCount());
354  }
355  else
356  {
357  fprintf(fp, "0 %d %s %s\n", (int)it->getEdgeInteratorCount(), gpm->getDataSetName().c_str(), gpm->getAttributeName().c_str());
358  }
359 
360  //create task
362 
363  task.setTotalSteps(static_cast<int>(it->getVertexInteratorCount()));
364  task.setMessage(TE_TR("Export to GWT Format."));
365 
366  //write body info
367  te::graph::Edge* e = it->getFirstEdge();
368 
369  while(it->isEdgeIteratorAfterEnd() == false)
370  {
371  int idFrom = e->getIdFrom();
372  int idTo = e->getIdTo();
373 
375 
376  double distance = sd->getValue();
377 
378  fprintf(fp, "%d %d %3.7f\n", idFrom, idTo, distance);
379 
380  if(!task.isActive())
381  {
382  fclose(fp);
383 
384  throw te::common::Exception(TE_TR("Operation canceled by the user."));
385  }
386 
387  task.pulse();
388 
389  e = it->getNextEdge();
390  }
391 
392  fclose(fp);
393 }
394 
396 {
397  //open file
398  std::ifstream file(pathFileName.c_str());
399 
400  if(file.is_open() == false)
401  return nullptr;
402 
403  int count = (int)std::count(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>(), '\n');
404 
405  file.clear();
406  file.seekg(0, std::ios::beg);
407 
408  //create output gpm
410 
411  // graph type
413 
414  // connection info
415  const std::string connInfo("memory:");
416 
417  // graph information
418  std::map<std::string, std::string> graphInfo;
419  graphInfo["GRAPH_DATA_SOURCE_TYPE"] = "MEM";
420  graphInfo["GRAPH_NAME"] = "gpm_gwt_graph";
421  graphInfo["GRAPH_DESCRIPTION"] = "Generated by Spatial Weights Exchanger.";
422 
423  //create output graph
424  gpm->setGraph(te::graph::AbstractGraphFactory::make(graphType, connInfo, graphInfo));
425 
426  te::graph::AbstractGraph* graph = gpm->getGraph();
427  assert(graph);
428 
429  //add edge property
431  p->setParent(nullptr);
432  p->setId(0);
433 
434  graph->addEdgeProperty(p);
435 
436  //create boost tokenizer
437  typedef boost::tokenizer< boost::escaped_list_separator<char> > Tokenizer;
438  boost::escaped_list_separator<char> sep('\\', ' ', '\"');
439 
440  std::vector<std::string> line;
441  std::string buffer;
442 
443  //get header line
444  std::getline(file, buffer);
445  Tokenizer tok(buffer, sep);
446  line.assign(tok.begin(), tok.end());
447 
448  std::string dataSetName;
449  std::string attributeName;
450  bool associateGeom = false;
451 
452  if(line.size() == 4 && ds) // has the number of observations and data set information
453  {
454  associateGeom = true;
455 
456  dataSetName = line[2];
457  attributeName = line[3];
458 
459  gpm->setDataSetName(dataSetName);
460  gpm->setAttributeName(attributeName);
461  }
462 
463  //create task
465 
466  task.setTotalSteps(count);
467  task.setMessage(TE_TR("Import from GWT Format."));
468 
469  //access each line of the gwt file
470  m_edgeId = 0;
471 
472  while(std::getline(file, buffer))
473  {
474  line.clear();
475 
476  Tokenizer tok(buffer, sep);
477 
478  line.assign(tok.begin(), tok.end());
479 
480  std::string fromStr, toStr, distanceStr;
481 
482  try
483  {
484  fromStr = line[0];
485  toStr = line[1];
486  distanceStr = line[2];
487  }
488  catch(...)
489  {
490  delete graph;
491 
492  return nullptr;
493  }
494 
495  //create vertex from
496  int from = atoi(fromStr.c_str());
497 
498  te::graph::Vertex* vFrom = graph->getVertex(from);
499 
500  if(!vFrom)
501  {
502  vFrom = new te::graph::Vertex(from);
503  graph->add(vFrom);
504  }
505 
506  //create vertex to
507  int to = atoi(toStr.c_str());
508 
509  te::graph::Vertex* vTo = graph->getVertex(to);
510 
511  if(!vTo)
512  {
513  vTo = new te::graph::Vertex(to);
514  graph->add(vTo);
515  }
516 
517  //create edge
518  int id = getEdgeId();
519  double distance = atof(distanceStr.c_str());
520 
521  te::graph::Edge* e = new te::graph::Edge(id, from, to);
522  e->setAttributeVecSize(1); //distance attribute
523  e->addAttribute(0, new te::dt::SimpleData<double, te::dt::DOUBLE_TYPE>(distance));
524 
525  graph->add(e);
526 
527  if(!task.isActive())
528  {
529  file.close();
530 
531  throw te::common::Exception(TE_TR("Operation canceled by the user."));
532  }
533 
534  task.pulse();
535  }
536 
537  file.close();
538 
539  if(associateGeom)
540  associateGeometry(gpm, ds);
541 
542  return gpm;
543 }
544 
545 void te::sa::SpatialWeightsExchanger::getSpatialWeightsFileInfo(std::string pathFileName, std::string& dataSetName, std::string& attrName)
546 {
547  //open file
548  std::ifstream file(pathFileName.c_str());
549 
550  if(file.is_open() == false)
551  return;
552 
553  //create boost tokenizer
554  typedef boost::tokenizer< boost::escaped_list_separator<char> > Tokenizer;
555  boost::escaped_list_separator<char> sep('\\', ' ', '\"');
556 
557  std::vector<std::string> line;
558  std::string buffer;
559 
560  //get header line
561  std::getline(file, buffer);
562  Tokenizer tok(buffer, sep);
563  line.assign(tok.begin(), tok.end());
564 
565  if(line.size() == 4) // has the number of observations and data set information
566  {
567  dataSetName = line[2];
568  attrName = line[3];
569  }
570 }
571 
573 {
574  int id = m_edgeId;
575 
576  m_edgeId++;
577 
578  return id;
579 }
580 
582 {
583  //get srid information
584  std::unique_ptr<te::da::DataSetType> dataSetType = ds->getDataSetType(gpm->getDataSetName());
586 
587  //create graph vertex attrs
589  gProp->setId(0);
590  gProp->setGeometryType(te::gm::PointType);
591  gProp->setSRID(gp->getSRID());
592 
594 
595  g->addVertexProperty(gProp);
596 
597  //get data set
598  std::unique_ptr<te::da::DataSet> dataSet = ds->getDataSet(gpm->getDataSetName());
599 
600  std::size_t geomPos = te::da::GetFirstSpatialPropertyPos(dataSet.get());
601 
602  //create task
604 
605  task.setTotalSteps(static_cast<int>(dataSet->size()));
606  task.setMessage(TE_TR("Associating Geometry to graph."));
607 
608  dataSet->moveBeforeFirst();
609 
610  while(dataSet->moveNext())
611  {
612  std::string strId = dataSet->getAsString(gpm->getAttributeName());
613 
614  int id = atoi(strId.c_str());
615 
616  te::graph::Vertex* v = g->getVertex(id);
617 
618  if(v)
619  {
620  v->setAttributeVecSize(1);
621 
622  std::unique_ptr<te::gm::Geometry> g = dataSet->getGeometry(geomPos);
623 
624  te::dt::AbstractData* ad = nullptr;
625 
626  if(g->getGeomTypeId() == te::gm::PointType)
627  {
628  g->setSRID(gp->getSRID());
629 
630  ad = g->clone();
631  }
632  else if(g->getGeomTypeId() == te::gm::PolygonType)
633  {
634  te::gm::Point* p = ((te::gm::Polygon*)g.get())->getCentroid();
635  p->setSRID(gp->getSRID());
636 
637  ad = p;
638  }
639  else if(g->getGeomTypeId() == te::gm::MultiPolygonType)
640  {
641  te::gm::Polygon* poly = (te::gm::Polygon*)((te::gm::MultiPolygon*)g.get())->getGeometryN(0);
642 
643  te::gm::Point* p = poly->getCentroid();
644  p->setSRID(gp->getSRID());
645 
646  ad = p;
647  }
648 
649  v->addAttribute(0, ad);
650 
651  v->setDirty(true);
652  }
653 
654  if(!task.isActive())
655  {
656  throw te::common::Exception(TE_TR("Operation canceled by the user."));
657  }
658 
659  task.pulse();
660  }
661 }
te::da::DataSource * getDataSource()
It returns the data source associated with this graph.
MultiPolygon is a MultiSurface whose elements are Polygons.
Definition: MultiPolygon.h:50
void setAttributeVecSize(int size)
This function is used to set the number of attributes associated with the vertex elements.
Definition: Vertex.cpp:79
void exportToGWT(te::sa::GeneralizedProximityMatrix *gpm, std::string pathFileName, int distAttrIdx)
Function used to export a gpm to Spatial Weights File GWT Format.
Geometric property.
void setMessage(const std::string &message)
Set the task message.
void associateGeometry(te::sa::GeneralizedProximityMatrix *gpm, te::da::DataSource *ds)
Function used to associate the geometry coord attribute to vertex objects.
void setSRID(int srid) _NOEXCEPT_OP(true)
It sets the Spatial Reference System ID of the Point.
An atomic property like an integer or double.
#define TE_SA_GEOMETRY_ATTR_NAME
This class defines a Generalized Proximity Matrix.
virtual te::graph::Edge * getEdge(int id)=0
It returns the edge element if it&#39;s exist.
virtual void addEdgeProperty(te::dt::Property *p)=0
Add a new property associated to the edge element.
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:53
int getEdgeId()
Function used to generated the edge id.
T getValue() const
It returns the associated value.
Definition: SimpleData.h:139
#define TE_SA_WEIGHT_ATTR_NAME
static te::dt::Date ds(2010, 01, 01)
te::sa::GeneralizedProximityMatrix * importFromGAL(std::string pathFileName, te::da::DataSource *ds=0)
Function used to import a gpm from a Spatial Weights File GAL Format.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
#define TE_TR(message)
It marks a string in order to get translated.
Definition: Translator.h:242
static std::string fromUTF8(const std::string &src)
Convert a string in UTF-8 to the current locale encoding.
This class defines functions used to load and save gpm&#39;s using GAL and GWT formats, both formats use a &#39; &#39; as separator.
te::sa::GeneralizedProximityMatrix * importFromGWT(std::string pathFileName, te::da::DataSource *ds=0)
Function used to import a gpm from a Spatial Weights File GWT Format.
virtual void add(Vertex *v)=0
Add a new vertex element to a graph.
bool isActive() const
Verify if the task is active.
From the point of view of graph theory, vertices are treated as featureless and indivisible objects...
Definition: Vertex.h:68
void setTotalSteps(int value)
Set the task total stepes.
void setId(unsigned int id)
It sets the property identifier.
Definition: Property.h:118
unsigned int line
virtual te::graph::GraphMetadata * getMetadata()=0
Function used to access the graph metadata.
Class used to define the edge struct of a graph. Its compose with a identifier, the vertex origin and...
Definition: Edge.h:58
void setDataSetName(const std::string &dataSetName)
SpatialWeightsExchanger()
Default constructor.
TEDATAACCESSEXPORT std::size_t GetFirstSpatialPropertyPos(const te::da::DataSet *dataset)
It returns the first dataset spatial property or NULL if none is found.
int getSRID() const
It returns the spatial reference system identifier associated to this property.
A point with x and y coordinate values.
Definition: Point.h:50
int m_edgeId
Attribute used as a index counter for edge objects.
virtual void addVertexProperty(te::dt::Property *p)=0
Add a new property associated to the vertex element.
Abstract class used to define the main functions of graph struct. All graph implementations must used...
Definition: AbstractGraph.h:55
te::gm::Polygon * p
virtual AbstractData * clone() const =0
It returns a clone of this object.
void pulse()
Calls setCurrentStep() function using getCurrentStep() + 1.
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:57
std::set< int > & getSuccessors()
Returns the Successors vector.
Definition: Vertex.cpp:106
int getIdFrom()
It returns the vertex origin identification.
Definition: Edge.cpp:71
static void getSpatialWeightsFileInfo(std::string pathFileName, std::string &dataSetName, std::string &attrName)
Function used to get information of how a Spatial Weights was generated.
virtual std::unique_ptr< te::da::DataSetType > getDataSetType(const std::string &name)
It gets information about the given dataset.
void exportToGAL(te::sa::GeneralizedProximityMatrix *gpm, std::string pathFileName)
Function used to export a gpm to Spatial Weights File GAL Format.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
~SpatialWeightsExchanger()
Virtual destructor.
static const std::string sm_factoryGraphTypeDirectedGraph
Directed Graph Factory Name.
virtual std::unique_ptr< DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, const te::common::AccessPolicy accessPolicy=te::common::RAccess)
It gets the dataset identified by the given name. This method always returns a disconnected dataset...
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:50
Point * getCentroid() const
It returns the mathematical centroid for this surface as a point.
int getId()
It returns the vertex id.
Definition: Vertex.cpp:69
A template for atomic data types (integers, floats, strings and others).
Definition: SimpleData.h:59
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
static AbstractGraph * make()
It creates and returns an empty graph with default graph type.
virtual te::graph::Vertex * getVertex(int id)=0
It returns the vertex element if it&#39;s exist.
void setAttributeName(const std::string &attrName)
std::vector< te::dt::AbstractData * > & getAttributes()
It returns the vector of attributes associated with this element.
Definition: Edge.cpp:81
file(WRITE ${CMAKE_BINARY_DIR}/config_qhelp.cmake"configure_file (${TERRALIB_ABSOLUTE_ROOT_DIR}/doc/qhelp/help.qhcp.in ${CMAKE_BINARY_DIR}/share/terraview/help/help.qhcp @ONLY)") add_custom_command(OUTPUT del_dir COMMAND $
void setGraph(te::graph::AbstractGraph *graph)
int getIdTo()
It returns the vertex destiny identification.
Definition: Edge.cpp:76
This class defines the GPM class.
void setParent(Property *p)
It associate this property to the informed parent.
Definition: Property.h:177