All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BufferDialog.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 terralib/vp/BufferDialog.cpp
22 
23  \brief A dialog for buffer operation
24 */
25 
26 // TerraLib
27 #include "../../common/Logger.h"
28 #include "../../common/progress/ProgressManager.h"
29 #include "../../common/Translator.h"
30 #include "../../common/STLUtils.h"
31 #include "../../dataaccess/dataset/DataSetType.h"
32 #include "../../dataaccess/datasource/DataSourceCapabilities.h"
33 #include "../../dataaccess/datasource/DataSourceInfo.h"
34 #include "../../dataaccess/datasource/DataSourceInfoManager.h"
35 #include "../../dataaccess/datasource/DataSourceManager.h"
36 #include "../../dataaccess/datasource/DataSourceFactory.h"
37 #include "../../dataaccess/utils/Utils.h"
38 #include "../../datatype/Enums.h"
39 #include "../../datatype/Property.h"
40 #include "../../geometry/Geometry.h"
41 #include "../../geometry/GeometryProperty.h"
42 #include "../../maptools/AbstractLayer.h"
43 #include "../../maptools/DataSetLayer.h"
44 #include "../../memory/DataSet.h"
45 #include "../../memory/DataSetItem.h"
46 #include "../../qt/widgets/datasource/selector/DataSourceSelectorDialog.h"
47 #include "../../qt/widgets/layer/utils/DataSet2Layer.h"
48 #include "../../qt/widgets/progress/ProgressViewerDialog.h"
49 #include "../../srs/Config.h"
50 #include "../Exception.h"
51 #include "../BufferMemory.h"
52 #include "BufferDialog.h"
53 #include "../BufferOp.h"
54 #include "../BufferQuery.h"
55 #include "ui_BufferDialogForm.h"
56 #include "Utils.h"
57 
58 // Qt
59 #include <QFileDialog>
60 #include <QList>
61 #include <QListWidget>
62 #include <QListWidgetItem>
63 #include <QMessageBox>
64 #include <QSize>
65 
66 // STL
67 #include <map>
68 
69 // BOOST
70 #include <boost/algorithm/string.hpp>
71 #include <boost/filesystem.hpp>
72 #include <boost/lexical_cast.hpp>
73 #include <boost/uuid/random_generator.hpp>
74 #include <boost/uuid/uuid_io.hpp>
75 
76 te::vp::BufferDialog::BufferDialog(QWidget* parent, Qt::WindowFlags f)
77  : QDialog(parent, f),
78  m_ui(new Ui::BufferDialogForm),
79  m_layers(std::list<te::map::AbstractLayerPtr>()),
80  m_selectedLayer(0)
81 {
82 // add controls
83  m_ui->setupUi(this);
84 
85 // add icons
86  m_ui->m_imgLabel->setPixmap(QIcon::fromTheme("vp-buffer-hint").pixmap(112,48));
87 
88  QSize iconSize(96, 48);
89 
90  m_ui->m_withoutBoundRadioButton->setIconSize(iconSize);
91  m_ui->m_withoutBoundRadioButton->setIcon(QIcon::fromTheme("buffer-without-boundaries"));
92 
93  m_ui->m_withBoundRadioButton->setIconSize(iconSize);
94  m_ui->m_withBoundRadioButton->setIcon(QIcon::fromTheme("buffer-with-boundaries"));
95 
96  m_ui->m_ruleImgLabel->setPixmap(QIcon::fromTheme("buffer-inside-outside").pixmap(150,60));
97  m_ui->m_targetDatasourceToolButton->setIcon(QIcon::fromTheme("datasource"));
98 
99 //add controls
100  m_ui->m_fixedDistanceLineEdit->setEnabled(true);
101  m_ui->m_fixedDistanceLineEdit->setValidator(new QDoubleValidator(this));
102 
104 
105 //signals
106  connect(m_ui->m_layersComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLayerComboBoxChanged(int)));
107  connect(m_ui->m_fixedRadioButton, SIGNAL(toggled(bool)), this, SLOT(onFixedDistanceToggled()));
108  connect(m_ui->m_fromAttRadioButton, SIGNAL(toggled(bool)), this, SLOT(onAttDistanceToggled()));
109  connect(m_ui->m_ruleInOutRadioButton, SIGNAL(toggled(bool)), this, SLOT(onRuleInOutToggled()));
110  connect(m_ui->m_ruleOnlyOutRadioButton, SIGNAL(toggled(bool)), this, SLOT(onRuleOutToggled()));
111  connect(m_ui->m_ruleOnlyInRadioButton, SIGNAL(toggled(bool)), this, SLOT(onRuleInToggled()));
112  connect(m_ui->m_withoutBoundRadioButton, SIGNAL(toggled(bool)), this, SLOT(onWithoutBoundToggled()));
113  connect(m_ui->m_withBoundRadioButton, SIGNAL(toggled(bool)), this, SLOT(onWithBoundToggled()));
114 
115  connect(m_ui->m_targetDatasourceToolButton, SIGNAL(pressed()), this, SLOT(onTargetDatasourceToolButtonPressed()));
116  connect(m_ui->m_targetFileToolButton, SIGNAL(pressed()), this, SLOT(onTargetFileToolButtonPressed()));
117 
118  connect(m_ui->m_okPushButton, SIGNAL(clicked()), this, SLOT(onOkPushButtonClicked()));
119  connect(m_ui->m_cancelPushButton, SIGNAL(clicked()), this, SLOT(onCancelPushButtonClicked()));
120 
121  m_ui->m_helpPushButton->setNameSpace("dpi.inpe.br.plugins");
122  m_ui->m_helpPushButton->setPageReference("plugins/vp/vp_buffer.html");
123 }
124 
126 {
127 }
128 
129 void te::vp::BufferDialog::setLayers(std::list<te::map::AbstractLayerPtr> layers)
130 {
131  m_layers = layers;
132 
133  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
134 
135  while(it != m_layers.end())
136  {
137  std::auto_ptr<te::da::DataSetType> dsType = it->get()->getSchema();
138  if(dsType->hasGeom())
139  m_ui->m_layersComboBox->addItem(QString(it->get()->getTitle().c_str()), QVariant(it->get()->getId().c_str()));
140  ++it;
141  }
142 }
143 
145 {
146  for(int i=1; i <= 10; ++i)
147  m_ui->m_levelsNumComboBox->addItem(QString::number(i));
148 }
149 
150 void te::vp::BufferDialog::setAttributesForDistance(std::vector<te::dt::Property*> properties)
151 {
152  m_ui->m_fromAttDistanceComboBox->clear();
153 
154  for(std::size_t i = 0; i < properties.size(); ++i)
155  {
156  if(properties[i]->getType() == te::dt::CDOUBLE_TYPE ||
157  properties[i]->getType() == te::dt::CFLOAT_TYPE ||
158  properties[i]->getType() == te::dt::CINT16_TYPE ||
159  properties[i]->getType() == te::dt::CINT32_TYPE ||
160  properties[i]->getType() == te::dt::DOUBLE_TYPE ||
161  properties[i]->getType() == te::dt::INT16_TYPE ||
162  properties[i]->getType() == te::dt::INT32_TYPE ||
163  properties[i]->getType() == te::dt::INT64_TYPE ||
164  properties[i]->getType() == te::dt::FLOAT_TYPE ||
165  properties[i]->getType() == te::dt::NUMERIC_TYPE ||
166  properties[i]->getType() == te::dt::UINT16_TYPE ||
167  properties[i]->getType() == te::dt::UINT32_TYPE ||
168  properties[i]->getType() == te::dt::UINT64_TYPE)
169  m_ui->m_fromAttDistanceComboBox->addItem(properties[i]->getName().c_str());
170  }
171 
172  if(m_ui->m_fromAttDistanceComboBox->count() > 0)
173  {
174  //m_ui->m_fromAttRadioButton->setEnabled(true);
175  }
176  else
177  m_ui->m_fromAttRadioButton->setEnabled(false);
178 }
179 
181 {
182  if(m_ui->m_ruleInOutRadioButton->isChecked())
183  return te::vp::INSIDE_OUTSIDE;
184  else if(m_ui->m_ruleOnlyOutRadioButton->isChecked())
185  return te::vp::ONLY_OUTSIDE;
186  else
187  return te::vp::ONLY_INSIDE;
188 }
189 
191 {
192  if(m_ui->m_withoutBoundRadioButton->isChecked())
193  return te::vp::DISSOLVE;
194  else
195  return te::vp::NOT_DISSOLVE;
196 }
197 
199 {
200  return m_outputLayer;
201 }
202 
204 {
205  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
206  std::string layerID = m_ui->m_layersComboBox->itemData(index, Qt::UserRole).toString().toStdString();
207 
208  while(it != m_layers.end())
209  {
210  if(layerID == it->get()->getId().c_str())
211  {
212  te::map::AbstractLayerPtr selectedLayer = it->get();
213  m_selectedLayer = selectedLayer;
214  std::auto_ptr<const te::map::LayerSchema> schema(selectedLayer->getSchema());
215 
216  if(schema->size() == 0)
217  return;
218 
219  te::common::FreeContents(m_properties);
220  m_properties.clear();
221 
222  const std::vector<te::dt::Property*>& properties = schema->getProperties();
223  te::common::Clone(properties, m_properties);
224 
225  setAttributesForDistance(m_properties);
226 
227  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(m_selectedLayer.get());
228  te::da::DataSourcePtr inDataSource = te::da::GetDataSource(dsLayer->getDataSourceId(), true);
229  te::da::DataSetType* dsType = te::da::GetDataSetType(dsLayer->getDataSetName(), inDataSource->getId());
230  std::auto_ptr<te::gm::GeometryProperty>geomProp(te::da::GetFirstGeomProperty(dsType));
231 
232  te::gm::GeomType gmType = geomProp->getGeometryType();
233  if(gmType == te::gm::PointType || gmType == te::gm::MultiPointType ||
235  {
236  m_ui->m_ruleInOutRadioButton->setDisabled(true);
237  m_ui->m_ruleOnlyInRadioButton->setDisabled(true);
238  m_ui->m_ruleOnlyOutRadioButton->setChecked(true);
239  }
240  else
241  {
242  m_ui->m_ruleInOutRadioButton->setEnabled(true);
243  m_ui->m_ruleOnlyInRadioButton->setEnabled(true);
244  m_ui->m_ruleInOutRadioButton->setChecked(true);
245  }
246 
247  return;
248  }
249  ++it;
250  }
251 }
252 
254 {
255  m_ui->m_fixedDistanceLineEdit->setEnabled(true);
256  m_ui->m_fromAttDistanceComboBox->setEnabled(false);
257 }
258 
260 {
261  m_ui->m_fromAttDistanceComboBox->setEnabled(true);
262  m_ui->m_fixedDistanceLineEdit->setEnabled(false);
263 }
264 
266 {
267  m_ui->m_ruleImgLabel->setPixmap(QIcon::fromTheme("buffer-inside-outside").pixmap(150,60));
268 }
269 
271 {
272  m_ui->m_ruleImgLabel->setPixmap(QIcon::fromTheme("buffer_only-outside").pixmap(150,60));
273 }
274 
276 {
277  m_ui->m_ruleImgLabel->setPixmap(QIcon::fromTheme("buffer-only-inside").pixmap(150,60));
278 }
279 
281 {
282  m_ui->m_copyColumnsCheckBox->setChecked(false);
283  m_ui->m_copyColumnsCheckBox->setEnabled(false);
284 }
285 
287 {
288  m_ui->m_copyColumnsCheckBox->setEnabled(true);
289 }
290 
292 {
293  m_ui->m_newLayerNameLineEdit->clear();
294  m_ui->m_newLayerNameLineEdit->setEnabled(true);
296  dlg.exec();
297 
298  std::list<te::da::DataSourceInfoPtr> dsPtrList = dlg.getSelecteds();
299 
300  if(dsPtrList.size() <= 0)
301  return;
302 
303  std::list<te::da::DataSourceInfoPtr>::iterator it = dsPtrList.begin();
304 
305  m_ui->m_repositoryLineEdit->setText(QString(it->get()->getTitle().c_str()));
306 
307  m_outputDatasource = *it;
308 
309  m_toFile = false;
310 }
311 
313 {
314  m_ui->m_newLayerNameLineEdit->clear();
315  m_ui->m_repositoryLineEdit->clear();
316 
317  QString fileName = QFileDialog::getSaveFileName(this, tr("Save as..."),
318  QString(), tr("Shapefile (*.shp *.SHP);;"),0, QFileDialog::DontConfirmOverwrite);
319 
320  if(fileName.isEmpty())
321  return;
322 
323  boost::filesystem::path outfile(fileName.toStdString());
324  std::string aux = outfile.leaf().string();
325  m_ui->m_newLayerNameLineEdit->setText(aux.c_str());
326  aux = outfile.string();
327  m_ui->m_repositoryLineEdit->setText(aux.c_str());
328 
329  m_toFile = true;
330  m_ui->m_newLayerNameLineEdit->setEnabled(false);
331 }
332 
334 {
335  QMessageBox::information(this, "Help", "Under development");
336 }
337 
339 {
340  if(m_ui->m_layersComboBox->currentText().isEmpty())
341  {
342  QMessageBox::information(this, "Buffer", "Select an input layer.");
343  return;
344  }
345 
346  // Checking consistency of the input layer where the buffer will executed
347  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(m_selectedLayer.get());
348  if(!dsLayer)
349  {
350  QMessageBox::information(this, "Buffer", "Can not execute this operation on this type of layer.");
351  return;
352  }
353 
354  const te::da::ObjectIdSet* oidSet = 0;
355 
356  if(m_ui->m_onlySelectedCheckBox->isChecked())
357  {
358  oidSet = m_selectedLayer->getSelected();
359  if(!oidSet)
360  {
361  QMessageBox::information(this, "Buffer", "Select the layer objects to perform the buffer operation.");
362  return;
363  }
364  }
365 
366  te::da::DataSourcePtr inDataSource = te::da::GetDataSource(dsLayer->getDataSourceId(), true);
367  if (!inDataSource.get())
368  {
369  QMessageBox::information(this, "Buffer", "The selected input data source can not be accessed.");
370  return;
371  }
372 
373  // Check consistency of buffer parameters
374  double fixedDistance;
375  std::string propDistance = "";
376  if(m_ui->m_fixedRadioButton->isChecked())
377  {
378  fixedDistance = m_ui->m_fixedDistanceLineEdit->text().toDouble();
379  if (fixedDistance <= 0)
380  {
381  QMessageBox::information(this, "Buffer", "Fixed distance value should be greater than 0.");
382  return;
383  }
384  }
385  else
386  {
387  fixedDistance = 0;
388  int i = m_ui->m_fromAttDistanceComboBox->currentIndex();
389  propDistance = m_ui->m_fromAttDistanceComboBox->itemText(i).toStdString();
390  }
391 
392  // Checking consistency of output paramenters
393  if(m_ui->m_repositoryLineEdit->text().isEmpty())
394  {
395  QMessageBox::information(this, "Buffer", "Select a repository for the resulting layer.");
396 
397  return;
398  }
399 
400  if(m_ui->m_newLayerNameLineEdit->text().isEmpty())
401  {
402  QMessageBox::information(this, "Buffer", "Define a name for the resulting layer.");
403  return;
404  }
405 
406  int bufferPolygonRule = getPolygonRule();
407  int bufferBoundariesRule = getBoundariesRule();
408  bool copyInputColumns = m_ui->m_copyColumnsCheckBox->isChecked();
409  int levels = m_ui->m_levelsNumComboBox->currentText().toInt();
410  std::string outputdataset = m_ui->m_newLayerNameLineEdit->text().toStdString();
411 
412  //progress
415 
416  try
417  {
418  bool res;
419 
420  if(m_toFile)
421  {
422  boost::filesystem::path uri(m_ui->m_repositoryLineEdit->text().toStdString());
423 
424  if(boost::filesystem::exists(uri))
425  {
426  QMessageBox::information(this, "Buffer", "Output file already exists. Remove it or select a new name and try again.");
427  return;
428  }
429 
430  std::size_t idx = outputdataset.find(".");
431  if(idx != std::string::npos)
432  outputdataset = outputdataset.substr(0,idx);
433 
434  std::map<std::string, std::string> dsinfo;
435  dsinfo["URI"] = uri.string();
436 
438  dsOGR->setConnectionInfo(dsinfo);
439  dsOGR->open();
440 
441  if(dsOGR->dataSetExists(outputdataset))
442  {
443  QMessageBox::information(this, "Buffer", "There is already a dataset with the requested name in the output data source. Remove it or select a new name and try again.");
444  return;
445  }
446 
447  this->setCursor(Qt::WaitCursor);
448 
449  te::vp::BufferOp* bufferOp = 0;
450 
451  // select a strategy based on the capabilities of the input datasource
452  const te::da::DataSourceCapabilities dsCapabilities = inDataSource->getCapabilities();
453 
454  if(dsCapabilities.supportsPreparedQueryAPI() && dsCapabilities.getQueryCapabilities().supportsSpatialSQLDialect())
455  {
456  bufferOp = new te::vp::BufferQuery();
457  }
458  else
459  {
460  bufferOp = new te::vp::BufferMemory();
461  }
462 
463  bufferOp->setInput(inDataSource, dsLayer->getDataSetName(), dsLayer->getSchema(), oidSet);
464  bufferOp->setOutput(dsOGR, outputdataset);
465  bufferOp->setParams(fixedDistance, bufferPolygonRule, bufferBoundariesRule, copyInputColumns, levels);
466 
467  if (!bufferOp->paramsAreValid())
468  res = false;
469  else
470  res = bufferOp->run();
471 
472  if(!res)
473  {
474  dsOGR->close();
475  QMessageBox::information(this, "Buffer", "Error: could not generate the buffer.");
476  }
477  dsOGR->close();
478 
479  delete bufferOp;
480 
481  // let's include the new datasource in the managers
482  boost::uuids::basic_random_generator<boost::mt19937> gen;
483  boost::uuids::uuid u = gen();
484  std::string id = boost::uuids::to_string(u);
485 
487  ds->setConnInfo(dsinfo);
488  ds->setTitle(uri.stem().string());
489  ds->setAccessDriver("OGR");
490  ds->setType("OGR");
491  ds->setDescription(uri.string());
492  ds->setId(id);
493 
494  te::da::DataSourcePtr newds = te::da::DataSourceManager::getInstance().get(id, "OGR", ds->getConnInfo());
495  newds->open();
497  m_outputDatasource = ds;
498  }
499  else
500  {
501  te::da::DataSourcePtr aux = te::da::GetDataSource(m_outputDatasource->getId());
502  if (!aux)
503  {
504  QMessageBox::information(this, "Buffer", "The selected output datasource can not be accessed.");
505  return;
506  }
507  if (aux->dataSetExists(outputdataset))
508  {
509  QMessageBox::information(this, "Buffer", "Dataset already exists. Remove it or select a new name and try again. ");
510  return;
511  }
512  this->setCursor(Qt::WaitCursor);
513  te::vp::BufferOp* bufferOp = 0;
514 
515  // select a strategy based on the capabilities of the input datasource
516  const te::da::DataSourceCapabilities dsCapabilities = inDataSource->getCapabilities();
517 
518  if(dsCapabilities.supportsPreparedQueryAPI() && dsCapabilities.getQueryCapabilities().supportsSpatialSQLDialect())
519  {
520  bufferOp = new te::vp::BufferQuery();
521  }
522  else
523  {
524  bufferOp = new te::vp::BufferMemory();
525  }
526 
527  bufferOp->setInput(inDataSource, dsLayer->getDataSetName(), dsLayer->getSchema());
528  bufferOp->setOutput(aux, outputdataset);
529  bufferOp->setParams(fixedDistance, bufferPolygonRule, bufferBoundariesRule, copyInputColumns, levels);
530 
531  if (!bufferOp->paramsAreValid())
532  res = false;
533  else
534  res = bufferOp->run();
535 
536  if(!res)
537  {
538  this->setCursor(Qt::ArrowCursor);
539  QMessageBox::information(this, "Buffer", "Error: could not generate the buffer.");
540  reject();
541  }
542 
543  delete bufferOp;
544  }
545 
546  // creating a layer for the result
547  te::da::DataSourcePtr outDataSource = te::da::GetDataSource(m_outputDatasource->getId());
548 
549  te::qt::widgets::DataSet2Layer converter(m_outputDatasource->getId());
550 
551  te::da::DataSetTypePtr dt(outDataSource->getDataSetType(outputdataset).release());
552  m_outputLayer = converter(dt);
553  }
554  catch(const std::exception& e)
555  {
556  this->setCursor(Qt::ArrowCursor);
557  QMessageBox::information(this, "Buffer", e.what());
558 
559 #ifdef TERRALIB_LOGGER_ENABLED
560  std::string str = "Buffer - ";
561  str += e.what();
562  te::common::Logger::logDebug("vp", str.c_str());
563 #endif //TERRALIB_LOGGER_ENABLED
564 
566  return;
567  }
568 
570  this->setCursor(Qt::ArrowCursor);
571  accept();
572 }
573 
575 {
576  reject();
577 }
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
Definition: Utils.cpp:262
void setAttributesForDistance(std::vector< te::dt::Property * > properties)
std::auto_ptr< Ui::BufferDialogForm > m_ui
Definition: BufferDialog.h:114
BufferDialog(QWidget *parent=0, Qt::WindowFlags f=0)
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
Utility functions for the data access module.
const std::string & getDataSetName() const
virtual bool run()=0
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
The boundaries between buffers will not be dissolved.
Definition: Enums.h:92
A dialog buffer operation.
A class that models the description of a dataset.
Definition: DataSetType.h:72
void onLayerComboBoxChanged(int index)
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
const QueryCapabilities & getQueryCapabilities() const
void onTargetFileToolButtonPressed()
The buffer is generated only outside of the polygons.
Definition: Enums.h:80
void removeViewer(int viewerId)
Dettach a progress viewer.
static ProgressManager & getInstance()
It returns a reference to the singleton instance.
const std::string & getDataSourceId() const
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition: ObjectIdSet.h:55
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
The buffer is generated only inside of the polygons.
Definition: Enums.h:81
void setParams(const double &distance, const int &bufferPolygonRule, const int &bufferBoundariesRule, const bool &copyInputColumns, const int &levels)
Definition: BufferOp.cpp:58
static std::auto_ptr< DataSource > make(const std::string &dsType)
void setInput(te::da::DataSourcePtr inDsrc, std::string inDsetName, std::auto_ptr< te::da::DataSetType > inDsetType, const te::da::ObjectIdSet *oidSet=0)
Definition: BufferOp.cpp:47
virtual bool paramsAreValid()
Definition: BufferOp.cpp:77
void setOutput(te::da::DataSourcePtr outDsrc, std::string dsname)
Definition: BufferOp.cpp:71
bool supportsSpatialSQLDialect() const
The buffer is generated Inside and outside of the polygons.
Definition: Enums.h:79
int addViewer(AbstractProgressViewer *apv)
Attach a progress viewer.
const std::list< te::da::DataSourceInfoPtr > & getSelecteds() const
A dialog for selecting a data source.
A class that represents a data source component.
void onTargetDatasourceToolButtonPressed()
TEDATAACCESSEXPORT DataSetType * GetDataSetType(const std::string &name, const std::string &datasourceId)
Definition: Utils.cpp:228
A layer with reference to a dataset.
Definition: DataSetLayer.h:47
std::auto_ptr< LayerSchema > getSchema() const
It returns the layer schema.
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
Definition: Utils.cpp:557
te::map::AbstractLayerPtr getLayer()
void Clone(const std::vector< T * > &src, std::vector< T * > &dst)
This function can be applied to a vector of pointers.
Definition: STLUtils.h:237
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
Definition: BoostUtils.h:55
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
The boundaries between buffers will be dissolved.
Definition: Enums.h:91