IdentityDialog.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/qt/IdentityDialog.cpp
22 
23  \brief Identity operation dialog.
24 */
25 
26 // TerraLib
27 #include "../../core/filesystem/FileSystem.h"
28 #include "../../core/logger/Logger.h"
29 #include "../../core/translator/Translator.h"
30 #include "../../common/progress/ProgressManager.h"
31 #include "../../common/StringUtils.h"
32 
33 #include "../../dataaccess/dataset/DataSet.h"
34 #include "../../dataaccess/dataset/DataSetType.h"
35 
36 #include "../../dataaccess/datasource/DataSourceCapabilities.h"
37 #include "../../dataaccess/datasource/DataSourceInfo.h"
38 #include "../../dataaccess/datasource/DataSourceInfoManager.h"
39 #include "../../dataaccess/datasource/DataSourceManager.h"
40 #include "../../dataaccess/datasource/DataSourceFactory.h"
41 
42 #include "../../dataaccess/utils/Utils.h"
43 
44 #include "../../datatype/Property.h"
45 #include "../../datatype/SimpleData.h"
46 
47 #include "../../geometry/GeometryProperty.h"
48 
49 #include "../../qt/widgets/datasource/selector/DataSourceSelectorDialog.h"
50 #include "../../qt/widgets/layer/utils/DataSet2Layer.h"
51 #include "../../qt/widgets/progress/ProgressViewerDialog.h"
52 #include "../../qt/widgets/utils/DoubleInputListWidget.h"
53 #include "../../qt/widgets/utils/FileDialog.h"
54 
55 #include "../ComplexData.h"
56 #include "../Exception.h"
57 #include "../Identity.h"
58 #include "../Utils.h"
59 
60 #include "IdentityDialog.h"
61 #include "ui_IdentityDialogForm.h"
62 #include "Utils.h"
63 
64 // Qt
65 #include <QFileDialog>
66 #include <QGridLayout>
67 #include <QMessageBox>
68 
69 // BOOST
70 #include <boost/filesystem.hpp>
71 #include <boost/uuid/random_generator.hpp>
72 #include <boost/uuid/uuid_io.hpp>
73 
75 
76 te::vp::IdentityDialog::IdentityDialog(QWidget* parent, Qt::WindowFlags f)
77  : QDialog(parent, f),
78  m_ui(new Ui::IdentityDialogForm),
79  m_layers(std::list<te::map::AbstractLayerPtr>())
80 {
81  // add controls
82  m_ui->setupUi(this);
83 
84  m_ui->m_imgLabel->setPixmap(
85  QIcon::fromTheme("vp-identity-hint").pixmap(112, 48));
86  m_ui->m_targetDatasourceToolButton->setIcon(QIcon::fromTheme("datasource"));
87 
88  //add double list widget to this form
89  m_inputDoubleInputListWidget.reset(new te::qt::widgets::DoubleInputListWidget(
90  m_ui->m_inputSelectionGroupBox));
91  m_inputDoubleInputListWidget->setFirstLayerLabel("");
92  m_inputDoubleInputListWidget->setSecondLayerLabel("");
93  m_inputDoubleInputListWidget->setOutputLabel("Output attributes");
94 
95  QGridLayout* inputLayout = new QGridLayout(m_ui->m_inputSelectionGroupBox);
96  inputLayout->addWidget(m_inputDoubleInputListWidget.get());
97  inputLayout->setContentsMargins(0, 0, 0, 0);
98 
99  connect(m_ui->m_inputLayerComboBox, SIGNAL(currentIndexChanged(int)), this,
100  SLOT(onInputLayerComboBoxChanged(int)));
101  connect(m_ui->m_intersectionLayerComboBox, SIGNAL(currentIndexChanged(int)),
102  this, SLOT(onIntersectionLayerComboBoxChanged(int)));
103  connect(m_ui->m_targetDatasourceToolButton, SIGNAL(pressed()), this,
104  SLOT(onTargetDatasourceToolButtonPressed()));
105  connect(m_ui->m_targetFileToolButton, SIGNAL(pressed()), this,
106  SLOT(onTargetFileToolButtonPressed()));
107  connect(m_ui->m_okPushButton, SIGNAL(clicked()), this,
108  SLOT(onOkPushButtonClicked()));
109  connect(m_ui->m_cancelPushButton, SIGNAL(clicked()), this,
110  SLOT(onCancelPushButtonClicked()));
111 
112  m_ui->m_helpPushButton->setNameSpace("dpi.inpe.br.plugins");
113  m_ui->m_helpPushButton->setPageReference("plugins/vp/vp_identity.html");
114 }
115 
117 
119  std::list<te::map::AbstractLayerPtr> layers)
120 {
121  std::list<te::map::AbstractLayerPtr>::iterator it = layers.begin();
122 
123  while (it != layers.end())
124  {
125  std::unique_ptr<te::da::DataSetType> dsType = it->get()->getSchema();
126  if (dsType->hasGeom())
127  {
128  m_layers.push_back(*it);
129  }
130 
131  ++it;
132  }
133 
135 
137 
139 }
140 
142 {
143  return m_layerResult;
144 }
145 
146 std::vector<std::string> te::vp::IdentityDialog::getWarnings()
147 {
148  return m_warnings;
149 }
150 
151 std::map<int, std::vector<std::string> >
153 {
154  std::map<int, std::vector<std::string> > propertiesMap;
155 
156  std::vector<std::string> propertiesName =
157  m_inputDoubleInputListWidget->getOutputValues();
158 
159  std::vector<int> layerIds =
160  m_inputDoubleInputListWidget->getOutputDataValues();
161 
162  if(propertiesName.size() != layerIds.size())
163  return propertiesMap;
164 
165  std::vector<std::string> inputProperties;
166  std::vector<std::string> intersectionProperties;
167 
168  for (std::size_t i = 0; i < layerIds.size(); ++i)
169  {
170  if(layerIds[i] == 0)
171  inputProperties.push_back(propertiesName[i]);
172  else
173  intersectionProperties.push_back(propertiesName[i]);
174  }
175 
176  if(!inputProperties.empty())
177  propertiesMap.insert(
178  std::pair<int, std::vector<std::string> >(0, inputProperties));
179 
180  if(!intersectionProperties.empty())
181  propertiesMap.insert(
182  std::pair<int, std::vector<std::string> >(1, intersectionProperties));
183 
184  return propertiesMap;
185 }
186 
188 {
189  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
190 
191  disconnect(m_ui->m_inputLayerComboBox, SIGNAL(currentIndexChanged(int)), this,
192  SLOT(onInputLayerComboBoxChanged(int)));
193 
194  while (it != m_layers.end())
195  {
196  m_ui->m_inputLayerComboBox->addItem(QString(it->get()->getTitle().c_str()),
197  QVariant::fromValue(*it));
198  ++it;
199  }
200 
201  connect(m_ui->m_inputLayerComboBox, SIGNAL(currentIndexChanged(int)), this,
202  SLOT(onInputLayerComboBoxChanged(int)));
203 
204  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(
205  m_ui->m_inputLayerComboBox->currentIndex(), Qt::UserRole);
206  te::map::AbstractLayerPtr layer = varLayer.value<te::map::AbstractLayerPtr>();
207 
208  m_inputSelectedLayer = layer;
209 }
210 
212 {
213  int currIndex = m_ui->m_inputLayerComboBox->currentIndex();
214 
215  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
216 
217  disconnect(m_ui->m_intersectionLayerComboBox,
218  SIGNAL(currentIndexChanged(int)), this,
220 
221  while (it != m_layers.end())
222  {
223  m_ui->m_intersectionLayerComboBox->addItem(
224  QString(it->get()->getTitle().c_str()), QVariant::fromValue(*it));
225  ++it;
226  }
227 
228  m_ui->m_intersectionLayerComboBox->removeItem(currIndex);
229 
230  connect(m_ui->m_intersectionLayerComboBox, SIGNAL(currentIndexChanged(int)),
231  this, SLOT(onIntersectionLayerComboBoxChanged(int)));
232 
233  QVariant varLayer = m_ui->m_intersectionLayerComboBox->itemData(
234  m_ui->m_intersectionLayerComboBox->currentIndex(), Qt::UserRole);
235  te::map::AbstractLayerPtr layer = varLayer.value<te::map::AbstractLayerPtr>();
236 
238 }
239 
241 {
242  std::vector<std::string> values;
243 
244  std::unique_ptr<te::da::DataSetType> inputSchema;
245  std::unique_ptr<te::da::DataSetType> intersectionSchema;
246 
247  std::vector<te::dt::Property*> inputProps;
248  std::vector<te::dt::Property*> intersectionProps;
249 
250  std::string inputName;
251  std::string intersectionName;
252 
254  {
255  inputSchema = m_inputSelectedLayer->getSchema();
256  inputProps = inputSchema->getProperties();
257  inputName = m_inputSelectedLayer->getTitle();
258  m_inputDoubleInputListWidget->setFirstLayerLabel(
259  QString::fromUtf8(inputName.c_str()));
260  }
262  {
263  intersectionSchema = m_intersectionSelectedLayer->getSchema();
264  intersectionProps = intersectionSchema->getProperties();
265  intersectionName = m_intersectionSelectedLayer->getTitle();
266  m_inputDoubleInputListWidget->setSecondLayerLabel(
267  QString::fromUtf8(intersectionName.c_str()));
268  }
269 
270  values.clear();
271  for (std::size_t i = 0; i < inputProps.size(); ++i)
272  {
273  if (inputProps[i]->getType() != te::dt::GEOMETRY_TYPE)
274  values.push_back(inputProps[i]->getName());
275  }
276  m_inputDoubleInputListWidget->setFirstInputValues(values);
277 
278  values.clear();
279  for (std::size_t i = 0; i < intersectionProps.size(); ++i)
280  {
281  if (intersectionProps[i]->getType() != te::dt::GEOMETRY_TYPE)
282  values.push_back(intersectionProps[i]->getName());
283  }
284  m_inputDoubleInputListWidget->setSecondInputValues(values);
285 }
286 
288 {
289  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(index, Qt::UserRole);
290  te::map::AbstractLayerPtr layer = varLayer.value<te::map::AbstractLayerPtr>();
291 
292  m_ui->m_intersectionLayerComboBox->clear();
293  m_inputDoubleInputListWidget->clearOutputValues();
294 
295  m_inputSelectedLayer = layer;
296 
298 
300 }
301 
303 {
304  QVariant varLayer =
305  m_ui->m_intersectionLayerComboBox->itemData(index, Qt::UserRole);
306  te::map::AbstractLayerPtr layer = varLayer.value<te::map::AbstractLayerPtr>();
307 
308  m_inputDoubleInputListWidget->clearOutputValues();
309 
311 
313 }
314 
316 {
317  m_ui->m_newLayerNameLineEdit->clear();
318  m_ui->m_newLayerNameLineEdit->setEnabled(true);
320  dlg.exec();
321 
322  std::list<te::da::DataSourceInfoPtr> dsPtrList = dlg.getSelecteds();
323 
324  if (dsPtrList.empty())
325  return;
326 
327  std::list<te::da::DataSourceInfoPtr>::iterator it = dsPtrList.begin();
328 
329  m_ui->m_repositoryLineEdit->setText(QString(it->get()->getTitle().c_str()));
330 
331  m_outputDatasource = *it;
332 
333  m_toFile = false;
334 }
335 
337 {
338  m_ui->m_newLayerNameLineEdit->clear();
339  m_ui->m_repositoryLineEdit->clear();
340 
342 
343  try {
344  fileDialog.exec();
345  }
346  catch (te::common::Exception& ex) {
347  QMessageBox::warning(this, tr("File information"), ex.what());
348  return;
349  }
350 
351  m_ui->m_repositoryLineEdit->setText(fileDialog.getPath().c_str());
352  m_ui->m_newLayerNameLineEdit->setText(fileDialog.getFileName().c_str());
353 
354  m_toFile = true;
355  m_ui->m_newLayerNameLineEdit->setEnabled(false);
356 }
357 
359 {
360  // Validate Input Layer.
361  if (m_ui->m_inputLayerComboBox->currentText().isEmpty())
362  {
363  QMessageBox::warning(this, tr("Identity"),
364  tr("Select an input layer."));
365  return;
366  }
367 
368  // Validate DataSource.
369  te::da::DataSourcePtr inputDataSource =
370  te::da::GetDataSource(m_inputSelectedLayer->getDataSourceId(), true);
371  if (!inputDataSource.get())
372  {
373  QMessageBox::information(
374  this, "Identity",
375  "The selected input data source can not be accessed.");
376  return;
377  }
378 
379  // Validate Identity Layer.
380  if (m_ui->m_intersectionLayerComboBox->currentText().isEmpty())
381  {
382  QMessageBox::warning(this, tr("Identity"),
383  tr("Select a layer to execute the operation."));
384  return;
385  }
386 
387  // Validate DataSource.
388  te::da::DataSourcePtr intersectionDataSource = te::da::GetDataSource(
389  m_intersectionSelectedLayer->getDataSourceId(), true);
390  if (!intersectionDataSource.get())
391  {
392  QMessageBox::information(
393  this, "Identity",
394  "The selected intersection data source can not be accessed.");
395  return;
396  }
397 
398  // Get output attributes.
399  std::map<int, std::vector<std::string> > attributesMap =
400  this->getSelectedProperties();
401 
402  std::map<std::string, te::dt::AbstractData*> specificParams;
403 
404  if (!attributesMap.empty())
405  {
406  std::map<int, std::vector<std::string> >::iterator it;
407 
408  it = attributesMap.find(0);
409  if(it != attributesMap.end())
410  {
411  std::unique_ptr<te::da::DataSetType> inputSchema =
412  m_inputSelectedLayer->getSchema();
413 
414  specificParams[inputSchema->getName()] =
416  }
417 
418  it = attributesMap.find(1);
419  if(it != attributesMap.end())
420  {
421  std::unique_ptr<te::da::DataSetType> intersectionSchema =
422  m_intersectionSelectedLayer->getSchema();
423 
424  specificParams[intersectionSchema->getName()] =
426  }
427  }
428 
429  // Validade output repository.
430  if(m_ui->m_repositoryLineEdit->text().isEmpty())
431  {
432  QMessageBox::warning(this, tr("Identity"),
433  tr("Select a repository for the resulting layer."));
434  return;
435  }
436 
437  if(m_ui->m_newLayerNameLineEdit->text().isEmpty())
438  {
439  QMessageBox::warning(this, tr("Identity"),
440  tr("Define a name for the resulting layer."));
441  return;
442  }
443 
444  if(m_inputSelectedLayer->getSRID() == TE_UNKNOWN_SRS ||
446  {
447  int ret = QMessageBox::question(
448  this, tr("Identity"),
449  tr("The two layers have incompatible SRS. The result might be "
450  "incorrect. Do you wish to continue?"),
451  QMessageBox::No, QMessageBox::Yes);
452  if (ret == QMessageBox::No)
453  return;
454  }
455 
456  // Verify if "Input Only Selected objects" is checked.
457  bool inputIsChecked = false;
458 
459  if (m_ui->m_inputOnlySelectedCheckBox->isChecked())
460  inputIsChecked = true;
461 
462  // Verify if "Intersection only selected objects" is checked.
463  bool intersectionIsChecked = false;
464 
465  if (m_ui->m_diffOnlySelectedCheckBox->isChecked())
466  intersectionIsChecked = true;
467 
468 
469  // Progress
471 
472  try
473  {
474  // Declare the input parameters
475  te::vp::InputParams structInputParams;
476  te::vp::InputParams structIntersectionParams;
477 
478  // Set the inputLayer parameters
479  structInputParams.m_inputDataSource = inputDataSource;
480  structInputParams.m_inputDataSetType =
481  m_inputSelectedLayer->getSchema().release();
482 
483  // Set the intersectionLayer parameters
484  structIntersectionParams.m_inputDataSource = intersectionDataSource;
485  structIntersectionParams.m_inputDataSetType =
486  m_intersectionSelectedLayer->getSchema().release();
487 
488  int inputSRID = m_inputSelectedLayer->getSRID();
489  int intersectionSRID = m_intersectionSelectedLayer->getSRID();
490 
491 
492  // Get DataSet and DataSetType using AbstractLayerPtr to process by
493  // memory, using GEOS.
495  m_inputSelectedLayer, inputIsChecked, inputSRID);
496 
497  if (inputData.m_dataSet)
498  structInputParams.m_inputDataSet = inputData.m_dataSet;
499 
500  if (inputData.m_dataSetType)
501  structInputParams.m_inputDataSetType = inputData.m_dataSetType;
502 
504  m_intersectionSelectedLayer, intersectionIsChecked, intersectionSRID);
505 
506  if (intersectionData.m_dataSet)
507  structIntersectionParams.m_inputDataSet = intersectionData.m_dataSet;
508 
509  if (intersectionData.m_dataSetType)
510  structIntersectionParams.m_inputDataSetType =
511  intersectionData.m_dataSetType;
512 
513  m_inputParams.push_back(structInputParams);
514  m_inputParams.push_back(structIntersectionParams);
515 
516  // Get the output dataset name.
517  std::string outputdataset =
518  m_ui->m_newLayerNameLineEdit->text().toUtf8().data();
519 
520  // Return of operation result.
521  bool res = true;
522 
523  if (m_toFile)
524  {
525  boost::filesystem::path uri(
526  m_ui->m_repositoryLineEdit->text().toUtf8().data());
527 
528  if (te::core::FileSystem::exists(uri.string()))
529  {
530  QMessageBox::information(
531  this, tr("Identity"),
532  tr("Output file already exists. Remove it and try again. "));
533 
534  return;
535  }
536 
537  std::size_t idx = outputdataset.find(".");
538  if(idx != std::string::npos)
539  outputdataset = outputdataset.substr(0, idx);
540 
541  std::string dsinfo("file://");
542  dsinfo += uri.string();
543 
544  te::da::DataSourcePtr dsOGR(
545  te::da::DataSourceFactory::make("OGR", dsinfo).release());
546 
547  dsOGR->open();
548 
549  this->setCursor(Qt::WaitCursor);
550 
551  // Set parameters (Input/Output).
555  m_params->setOutputDataSetName(outputdataset);
556  m_params->setSpecificParams(specificParams);
557 
558  te::vp::Identity identity;
559 
560  res = identity.executeMemory(m_params);
561 
562  delete m_params;
563 
564  if(!res)
565  {
566  dsOGR->close();
567 
568  QMessageBox::information(
569  this, tr("Identity"),
570  tr("Error: could not generate the difference."));
571 
572  reject();
573  }
574 
575  // let's include the new datasource in the managers
576  boost::uuids::basic_random_generator<boost::mt19937> gen;
577  boost::uuids::uuid u = gen();
578  std::string ds_id = boost::uuids::to_string(u);
579 
581  ds->setConnInfo(dsinfo);
582  ds->setTitle(uri.stem().string());
583  ds->setAccessDriver("OGR");
584  ds->setType("OGR");
585  ds->setDescription(uri.string());
586  ds->setId(ds_id);
587 
588  te::da::DataSourcePtr newds =
589  te::da::DataSourceManager::getInstance().get(ds_id, "OGR",
590  ds->getConnInfo());
591 
592  newds->open();
595 
596  if (!m_outputDatasource)
597  {
598  QMessageBox::information(
599  this, tr("Identity"),
600  tr("The output data source can not be accessed."));
601 
602  return;
603  }
604  }
605  else
606  {
609 
610  if (!aux.get())
611  {
612  QMessageBox::information(
613  this, tr("Identity"),
614  tr("The output data source can not be accessed."));
615 
616  return;
617  }
618 
619  std::string name = te::common::Convert2LCase(outputdataset);
620 
621  if (aux->dataSetExists(name))
622  {
623  QMessageBox::information(this, tr("Identity"),
624  tr("Dataset already exists. Remove it or "
625  "select a new name and try again."));
626 
627  return;
628  }
629 
630  this->setCursor(Qt::WaitCursor);
631 
632  // Set parameters (Input/Output).
636  m_params->setOutputDataSetName(outputdataset);
637  m_params->setSpecificParams(specificParams);
638 
639  te::vp::Identity identity;
640 
641  res = identity.executeMemory(m_params);
642 
643  delete m_params;
644 
645  if(!res)
646  {
647  this->setCursor(Qt::ArrowCursor);
648  QMessageBox::information(this, tr("Identity"),
649  tr("Error: could not generate the identity."));
650  reject();
651  }
652  }
653 
654  // Creating a layer for the result
655  te::da::DataSourcePtr outDataSource =
657 
659 
661  outDataSource->getDataSetType(outputdataset).release());
662 
663  m_layerResult = converter(dt);
664  }
665  catch(const std::exception& e)
666  {
667  this->setCursor(Qt::ArrowCursor);
668  QMessageBox::warning(this, tr("Identity"), e.what());
669 
670  std::string str = "Vector Processing - Identity - ";
671  str += e.what();
672  TE_LOG_ERROR(str);
673 
674  return;
675  }
676 
677  this->setCursor(Qt::ArrowCursor);
678  accept();
679 }
680 
682 {
683  reject();
684 }
685 
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
static std::unique_ptr< DataSource > make(const std::string &driver, const te::core::URI &connInfo)
A structure to hold the input parameters of vector processing.
Definition: InputParams.h:50
Defines a component for choose a file.
Definition: FileDialog.h:52
te::da::DataSetType * m_dataSetType
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
static bool exists(const std::string &path)
Checks if a given path in UTF-8 exists.
Definition: FileSystem.cpp:142
bool m_toFile
The result is in a file?
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
DataStruct GetDataStructFromLayer(te::map::AbstractLayerPtr layer, bool onlySelectedObjects, int srid=0)
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
boost::shared_ptr< DataSource > DataSourcePtr
std::string Convert2LCase(const std::string &value)
It converts a string to lower case.
Definition: StringUtils.h:202
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
virtual const char * what() const
It outputs the exception message.
std::list< te::map::AbstractLayerPtr > m_layers
The vector layers in Layer Explorer.
void setOutputDataSetName(const std::string &outputDataSetName)
static te::dt::Date ds(2010, 01, 01)
std::vector< std::string > getWarnings()
te::da::DataSourcePtr m_inputDataSource
Is Required.
Definition: InputParams.h:81
void setOutputDataSource(te::da::DataSourcePtr outputDataSource)
void onIntersectionLayerComboBoxChanged(int index)
te::map::AbstractLayerPtr getLayer()
Q_DECLARE_METATYPE(te::map::AbstractLayerPtr) te
Get a list of AbstractLayer filtered by the name;.
std::unique_ptr< Ui::IdentityDialogForm > m_ui
bool executeMemory(te::vp::AlgorithmParams *mainParams)
A template for complex data types.
Definition: ComplexData.h:52
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
void exec()
This method will open the dialog of file selection and populate the class members with the chosen fil...
Definition: FileDialog.cpp:54
URI C++ Library.
Definition: Attributes.h:37
static te::dt::TimeDuration dt(20, 30, 50, 11)
te::da::DataSetType * m_inputDataSetType
Is required.
Definition: InputParams.h:82
Utility functions for the data access module.
te::map::AbstractLayerPtr m_inputSelectedLayer
Input layer selected.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
std::string getPath()
This method will return the chosen path.
Definition: FileDialog.cpp:103
te::map::AbstractLayerPtr m_intersectionSelectedLayer
Identity layer selected.
te::da::DataSet * m_inputDataSet
Is required for operations in memory.
Definition: InputParams.h:84
const std::list< te::da::DataSourceInfoPtr > & getSelecteds() const
te::vp::AlgorithmParams * m_params
Algorithm parameters.
A dialog for selecting a data source.
#define TE_LOG_ERROR(message)
Use this tag in order to log a message to the TerraLib default logger with the ERROR level...
Definition: Logger.h:337
A class that represents a data source component.
std::vector< te::vp::InputParams > m_inputParams
A vector of input parameters.
void setInputParams(const std::vector< te::vp::InputParams > &setInputParams)
te::map::AbstractLayerPtr m_layerResult
Generated Layer.
std::vector< std::string > m_warnings
Warnings during the operation.
std::string getFileName()
This method will return the file name.
Definition: FileDialog.cpp:113
std::unique_ptr< te::qt::widgets::DoubleInputListWidget > m_inputDoubleInputListWidget
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
void onTargetDatasourceToolButtonPressed()
void setSpecificParams(const std::map< std::string, te::dt::AbstractData * > &specificParams)
void onInputLayerComboBoxChanged(int index)
te::da::DataSet * m_dataSet
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
std::map< int, std::vector< std::string > > getSelectedProperties()
Identity operation dialog.