MainWindowDialog.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/addressgeocoding/MainWindowDialog.cpp
22 
23  \brief A dialog for Address Geocoding operation
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/STLUtils.h"
32 #include "../../dataaccess/dataset/DataSetType.h"
33 #include "../../dataaccess/dataset/ObjectIdSet.h"
34 #include "../../dataaccess/datasource/DataSourceCapabilities.h"
35 #include "../../dataaccess/datasource/DataSourceInfo.h"
36 #include "../../dataaccess/datasource/DataSourceInfoManager.h"
37 #include "../../dataaccess/datasource/DataSourceFactory.h"
38 #include "../../dataaccess/datasource/DataSourceManager.h"
39 #include "../../dataaccess/utils/Utils.h"
40 #include "../../datatype/Enums.h"
41 #include "../../datatype/Property.h"
42 #include "../../maptools/AbstractLayer.h"
43 #include "../../qt/af/Utils.h"
44 #include "../../qt/widgets/datasource/selector/DataSourceSelectorDialog.h"
45 #include "../../qt/widgets/layer/utils/DataSet2Layer.h"
46 #include "../../qt/widgets/progress/ProgressViewerDialog.h"
47 #include "../../qt/widgets/Utils.h"
48 #include "../AddressGeocodingOp.h"
49 #include "../Config.h"
50 #include "../Exception.h"
51 #include "MainWindowDialog.h"
53 #include "ConfigInputLayerDialog.h"
54 #include "ui_MainWindowDialogForm.h"
55 
56 // Qt
57 #include <QFileDialog>
58 #include <QMessageBox>
59 #include <QSettings>
60 
61 // Boost
62 #include <boost/algorithm/string.hpp>
63 #include <boost/filesystem.hpp>
64 #include <boost/uuid/random_generator.hpp>
65 #include <boost/uuid/uuid_io.hpp>
66 
68  : QDialog(parent, f),
69  m_ui(new Ui::MainWindowDialogForm),
70  m_layers(std::list<te::map::AbstractLayerPtr>()),
71  m_newColumnLayer(0)
72 {
73 // add controls
74  m_ui->setupUi(this);
75 
76 // add icons
77  m_ui->m_imgLabel->setPixmap(QIcon::fromTheme("addressgeocoding-hint").pixmap(112,48));
78  m_ui->m_targetDatasourceToolButton->setIcon(QIcon::fromTheme("datasource"));
79  m_ui->m_targetDataSourceAddressToolButton->setIcon(QIcon::fromTheme("datasource"));
80  m_ui->m_editAddressFileToolButton->setIcon(QIcon::fromTheme("preferences-system"));
81  m_ui->m_removeAddressFileToolButton->setIcon(QIcon::fromTheme("delete"));
82 
83  connect(m_ui->m_inputLayerComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLayerComboBoxChanged(int)));
84  connect(m_ui->m_iLeftComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onInitialLeftComboBoxChanged(int)));
85  connect(m_ui->m_fLeftComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFinalLeftComboBoxChanged(int)));
86  connect(m_ui->m_iRightComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onInitialRightComboBoxChanged(int)));
87  connect(m_ui->m_fRightComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFinalRightComboBoxChanged(int)));
88  connect(m_ui->m_inputAddressComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onAddressComboBoxChanged(int)));
89 
90  connect(m_ui->m_targetFileToolButton, SIGNAL(pressed()), this, SLOT(onTargetFileToolButtonPressed()));
91  connect(m_ui->m_targetDatasourceToolButton, SIGNAL(pressed()), this, SLOT(onTargetDatasourceToolButtonPressed()));
92 
93  connect(m_ui->m_configureLayerPushButton, SIGNAL(clicked()), this, SLOT(onConfigureLayerClicked()));
94  connect(m_ui->m_targetFileAddressToolButton, SIGNAL(clicked()), this, SLOT(onTargetFileAddressToolButtonPressed()));
95 
96  connect(m_ui->m_removeAddressFileToolButton, SIGNAL(clicked()), this, SLOT(onRemoveAddressToolButtonPressed()));
97  connect(m_ui->m_editAddressFileToolButton, SIGNAL(clicked()), this, SLOT(onEditAddressToolButtonPressed()));
98 
99  connect(m_ui->m_okPushButton, SIGNAL(clicked()), this, SLOT(onOkPushButtonClicked()));
100  connect(m_ui->m_cancelPushButton, SIGNAL(clicked()), this, SLOT(onCancelPushButtonClicked()));
101 
102  m_ui->m_helpPushButton->setNameSpace("dpi.inpe.br.plugins");
103  m_ui->m_helpPushButton->setPageReference("plugins/addressgeocoding/addressgeocoding.html");
104 
105 // Load the Address file Name.
107  std::map<std::string, std::vector<std::string> >::iterator it = m_mapFields.begin();
108 
109  while(it != m_mapFields.end())
110  {
111  m_ui->m_inputAddressComboBox->addItem(QString(it->first.c_str()));
112  ++it;
113  }
114 }
115 
117 {
118 }
119 
120 void te::addressgeocoding::MainWindowDialog::setLayers(std::list<te::map::AbstractLayerPtr> layers)
121 {
122  m_layers = layers;
123 
124  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
125 
126  while(it != m_layers.end())
127  {
128  std::unique_ptr<te::da::DataSetType> dsType = it->get()->getSchema();
129  std::vector<te::dt::Property*> properties = dsType->getProperties();
130  for(std::size_t i = 0; i < properties.size(); ++i)
131  {
132  std::string name = properties[i]->getName();
133  if(name == "tsvector")
134  m_ui->m_inputLayerComboBox->addItem(QString(it->get()->getTitle().c_str()), QVariant(it->get()->getId().c_str()));
135  }
136 
137  ++it;
138  }
139 }
140 
142 {
143  return m_resultLayer;
144 }
145 
147 {
148  std::list<te::map::AbstractLayerPtr>::iterator it = m_layers.begin();
149 
150  std::string layerID = m_ui->m_inputLayerComboBox->itemData(index, Qt::UserRole).toString().toUtf8().data();
151 
152  while(it != m_layers.end())
153  {
154  if(layerID == it->get()->getId().c_str())
155  {
156  te::map::AbstractLayerPtr selectedLayer = it->get();
157  m_selectedLayer = selectedLayer;
158 
159  std::unique_ptr<te::da::DataSetType> dsType = m_selectedLayer->getSchema();
160  std::vector<te::dt::Property*> propVec = dsType->getProperties();
161 
162  m_ui->m_iLeftComboBox->clear();
163  m_ui->m_fLeftComboBox->clear();
164  m_ui->m_iRightComboBox->clear();
165  m_ui->m_fRightComboBox->clear();
166 
167  m_ui->m_iLeftComboBox->addItem("");
168  m_ui->m_fLeftComboBox->addItem("");
169  m_ui->m_iRightComboBox->addItem("");
170  m_ui->m_fRightComboBox->addItem("");
171 
172  int type;
173 
174  for(std::size_t i = 0; i < propVec.size(); ++i)
175  {
176  type = propVec[i]->getType();
177  if(type == te::dt::INT16_TYPE ||
178  type == te::dt::INT32_TYPE ||
179  type == te::dt::INT64_TYPE ||
180  type == te::dt::DOUBLE_TYPE ||
181  type == te::dt::NUMERIC_TYPE)
182  {
183  m_ui->m_iLeftComboBox->addItem(QString(propVec[i]->getName().c_str()));
184  m_ui->m_fLeftComboBox->addItem(QString(propVec[i]->getName().c_str()));
185  m_ui->m_iRightComboBox->addItem(QString(propVec[i]->getName().c_str()));
186  m_ui->m_fRightComboBox->addItem(QString(propVec[i]->getName().c_str()));
187  }
188  }
189 
190  return;
191  }
192  ++it;
193  }
194 }
195 
197 {
198  m_initialLeft = m_ui->m_iLeftComboBox->itemText(index).toUtf8().data();
199 }
200 
202 {
203  m_finalLeft = m_ui->m_fLeftComboBox->itemText(index).toUtf8().data();
204 }
205 
207 {
208  m_initialRight = m_ui->m_iRightComboBox->itemText(index).toUtf8().data();
209 }
210 
212 {
213  m_finalRight = m_ui->m_fRightComboBox->itemText(index).toUtf8().data();
214 }
215 
217 {
219  dlg.setLayers(m_layers);
220 
221  if(dlg.exec() == QDialog::Accepted)
222  {
223  m_newColumnLayer = dlg.getLayer();
225  m_ui->m_inputLayerComboBox->clear();
227  }
228  return;
229 }
230 
232 {
233  // Load the Address file Name.
234 
235  if(index == -1)
236  {
237  m_ui->m_editAddressFileToolButton->setEnabled(false);
238  m_ui->m_removeAddressFileToolButton->setEnabled(false);
239  return;
240  }
241 
243 
244  std::map<std::string, std::vector<std::string> >::iterator it;
245 
246  std::string value = m_ui->m_inputAddressComboBox->itemText(index).toUtf8().data();
247 
248  it = m_mapFields.find(value);
249  m_addressFile = it->first;
250  std::vector<std::string> vecFields = it->second;
251 
252  m_associatedProps.clear();
253 
254  for(std::size_t i = 0; i < vecFields.size(); ++i)
255  {
256  if(i != 0 && i != 2 && vecFields[i] != "")
257  m_associatedProps.push_back(vecFields[i]);
258  if(i == 0)
259  GetAddressDataSource(vecFields[i]);
260  if(i == 2)
261  m_streetNumber = m_mapFields.begin()->second[i];
262  }
263 
264  m_ui->m_editAddressFileToolButton->setEnabled(true);
265  m_ui->m_removeAddressFileToolButton->setEnabled(true);
266 }
267 
269 {
270  try
271  {
272  QString fileName = QFileDialog::getOpenFileName(this, tr("Open Textual File"), te::qt::widgets::GetFilePathFromSettings("tabular"), tr("dBASE (*.dbf *.DBF);; Comma Separated Value (*.csv *.CSV)"),
273  0, QFileDialog::ReadOnly);
274 
275  GetAddressDataSource(fileName.toUtf8().data());
276 
277  if (fileName.isEmpty())
278  return;
279 
281 
284 
285  if(dlg.exec() == QDialog::Accepted)
286  {
289 
290  if(dlg.getStreetType() != "")
291  m_associatedProps.push_back(dlg.getStreetType());
292 
293  if(dlg.getStreetTitle() != "")
294  m_associatedProps.push_back(dlg.getStreetTitle());
295 
296  if(dlg.getStreetName() != "")
297  m_associatedProps.push_back(dlg.getStreetName());
298 
299  if(dlg.getStreetNeighborhood() != "")
300  m_associatedProps.push_back(dlg.getStreetNeighborhood());
301 
302  if(dlg.getStreetPostalCode() != "")
303  m_associatedProps.push_back(dlg.getStreetPostalCode());
304 
306 
307  m_ui->m_inputAddressComboBox->addItem(QString(m_addressFile.c_str()));
308  }
309 
310  return;
311  }
312  catch(const std::exception& e)
313  {
314  QMessageBox::warning(this, tr("Address Geocoding"), e.what());
315  }
316 }
317 
319 {
321 
324 
325  std::map<std::string, std::vector<std::string> > mapFields;
326  GetAddressFilePathToSettings(mapFields);
327  std::map<std::string, std::vector<std::string> >::iterator it;
328 
329  std::string value = m_ui->m_inputAddressComboBox->currentText().toUtf8().data();
330 
331  it = mapFields.find(value);
332  m_addressFile = it->first;
333  std::vector<std::string> vecFields = it->second;
334 
335  dlg.setStreetNeighborhood(vecFields[1]);
336  dlg.setStreetNumber(vecFields[2]);
337  dlg.setStreetPostalCode(vecFields[3]);
338  dlg.setStreetName(vecFields[4]);
339  dlg.setStreetTitle(vecFields[5]);
340  dlg.setStreetType(vecFields[6]);
341 
342  if(dlg.exec() == QDialog::Accepted)
343  {
346 
347  if(dlg.getStreetType() != "")
348  m_associatedProps.push_back(dlg.getStreetType());
349 
350  if(dlg.getStreetTitle() != "")
351  m_associatedProps.push_back(dlg.getStreetTitle());
352 
353  if(dlg.getStreetName() != "")
354  m_associatedProps.push_back(dlg.getStreetName());
355 
356  if(dlg.getStreetNeighborhood() != "")
357  m_associatedProps.push_back(dlg.getStreetNeighborhood());
358 
359  if(dlg.getStreetPostalCode() != "")
360  m_associatedProps.push_back(dlg.getStreetPostalCode());
361 
363 
364  m_ui->m_inputAddressComboBox->addItem(QString(m_addressFile.c_str()));
365  }
366 
367  return;
368 }
369 
371 {
372  QSettings sett(QSettings::IniFormat, QSettings::UserScope, qApp->organizationName(), qApp->applicationName());
373 
374  sett.beginGroup("Address Geocoding");
375 
376  sett.remove(m_ui->m_inputAddressComboBox->currentText());
377  m_ui->m_inputAddressComboBox->removeItem(m_ui->m_inputAddressComboBox->currentIndex());
378 
379  sett.endGroup();
380 }
381 
383 {
384  m_ui->m_newLayerNameLineEdit->clear();
385  m_ui->m_newLayerNameLineEdit->setEnabled(true);
387  dlg.exec();
388 
389  std::list<te::da::DataSourceInfoPtr> dsPtrList = dlg.getSelecteds();
390 
391  if(dsPtrList.size() <= 0)
392  return;
393 
394  std::list<te::da::DataSourceInfoPtr>::iterator it = dsPtrList.begin();
395 
396  m_ui->m_repositoryLineEdit->setText(QString(it->get()->getTitle().c_str()));
397 
398  m_outputDatasource = *it;
399 
400  m_toFile = false;
401 }
402 
404 {
405  m_ui->m_newLayerNameLineEdit->clear();
406  m_ui->m_repositoryLineEdit->clear();
407 
408  QString fileName = QFileDialog::getSaveFileName(this, tr("Save as..."),
409  QString(), tr("Shapefile (*.shp *.SHP);;"),0, QFileDialog::DontConfirmOverwrite);
410 
411  if (fileName.isEmpty())
412  return;
413 
414  boost::filesystem::path outfile(fileName.toUtf8().data());
415  std::string aux = outfile.leaf().string();
416  m_ui->m_newLayerNameLineEdit->setText(aux.c_str());
417  aux = outfile.string();
418  m_ui->m_repositoryLineEdit->setText(aux.c_str());
419 
420  m_toFile = true;
421  m_ui->m_newLayerNameLineEdit->setEnabled(false);
422 }
423 
425 {
426  if(!m_selectedLayer)
427  {
428  QMessageBox::information(this, "Address Geocoding", "Configure an input layer.");
429  return;
430  }
431 
432  if((m_initialLeft == "" || m_finalLeft == "")&&(m_initialRight == "" || m_finalRight == ""))
433  {
434  QMessageBox::information(this, "Address Geocoding", "Associates the number fields with attributes of input layer.");
435  return;
436  }
437 
438  if(m_addressFile == "")
439  {
440  QMessageBox::information(this, "Address Geocoding", "Configure an input address.");
441  return;
442  }
443 
444  if(!m_layerDataSource)
445  {
446  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(m_selectedLayer.get());
448  }
449 
451 
452  addGeoOp->setInput( m_layerDataSource,
453  m_selectedLayer->getTitle(),
454  m_selectedLayer->getSRID(),
456  m_addressFile);
457 
458  addGeoOp->setParams(m_associatedProps,
460 
461  addGeoOp->setNumAttributes( m_initialLeft,
462  m_finalLeft,
464  m_finalRight);
465 
466  std::string outputdataset = m_ui->m_newLayerNameLineEdit->text().toUtf8().data();
467 
468  te::da::DataSourcePtr outputDataSource;
469  bool res;
470 
471  try
472  {
473  if(m_toFile)
474  {
475  boost::filesystem::path uri(m_ui->m_repositoryLineEdit->text().toUtf8().data());
476 
477  if (te::core::FileSystem::exists(uri.string()))
478  {
479  QMessageBox::information(this, "Address Geocoding", "Output file already exists. Remove it or select a new name and try again.");
480  return;
481  }
482 
483  std::size_t idx = outputdataset.find(".");
484  if (idx != std::string::npos)
485  outputdataset=outputdataset.substr(0,idx);
486 
487  std::string dsinfo("file://" + uri.string());
488 
489  outputDataSource.reset(te::da::DataSourceFactory::make("OGR", dsinfo).release());
490  outputDataSource->open();
491  if (outputDataSource->dataSetExists(outputdataset))
492  {
493  QMessageBox::information(this, "Address Geocoding", "There is already a dataset with the requested name in the output data source. Remove it or select a new name and try again.");
494  return;
495  }
496 
497  this->setCursor(Qt::WaitCursor);
498 
499  addGeoOp->setOutput(outputDataSource,
500  outputdataset);
501 
502  if (!addGeoOp->paramsAreValid())
503  res = false;
504  else
505  res = addGeoOp->run();
506 
507  if (!res)
508  {
509  this->setCursor(Qt::ArrowCursor);
510  outputDataSource->close();
511  QMessageBox::information(this, "Address Geocoding", "Error: could not generate the address geocoding.");
512  reject();
513  }
514  outputDataSource->close();
515 
516  delete addGeoOp;
517 
518 // let's include the new datasource in the managers
519  boost::uuids::basic_random_generator<boost::mt19937> gen;
520  boost::uuids::uuid u = gen();
521  std::string id_ds = boost::uuids::to_string(u);
522 
524  ds->setConnInfo(dsinfo);
525  ds->setTitle(uri.stem().string());
526  ds->setAccessDriver("OGR");
527  ds->setType("OGR");
528  ds->setDescription(uri.string());
529  ds->setId(id_ds);
530 
531  te::da::DataSourcePtr newds = te::da::DataSourceManager::getInstance().get(id_ds, "OGR", ds->getConnInfo());
532  newds->open();
535 
536  }
537  else
538  {
539  outputDataSource = te::da::GetDataSource(m_outputDatasource->getId());
540  if (!outputDataSource)
541  {
542  QMessageBox::information(this, "Address Geocoding", "The selected output datasource can not be accessed.");
543  return;
544  }
545 
546  if (outputDataSource->dataSetExists(outputdataset))
547  {
548  QMessageBox::information(this, "Address Geocoding", "Dataset already exists. Remove it or select a new name and try again.");
549  return;
550  }
551  this->setCursor(Qt::WaitCursor);
552 
553  addGeoOp->setOutput(outputDataSource,
554  outputdataset);
555 
556  if (!addGeoOp->paramsAreValid())
557  res = false;
558  else
559  res = addGeoOp->run();
560 
561  delete addGeoOp;
562 
563  if (!res)
564  {
565  this->setCursor(Qt::ArrowCursor);
566  outputDataSource->close();
567  QMessageBox::information(this, "Address Geocoding", "Error: could not generate the address geocoding.");
568  reject();
569  }
570  outputDataSource->close();
571 
572  }
573 
574 // creating a layer for the result
576 
578 
579  te::da::DataSetTypePtr dt(outDataSource->getDataSetType(outputdataset).release());
580  m_resultLayer = converter(dt);
581 
582  }
583  catch(const std::exception& e)
584  {
585  this->setCursor(Qt::ArrowCursor);
586 
587  QMessageBox::information(this, "Address Geocoding", e.what());
588 
589  //TE_CORE_LOG_DEBUG("addressgeocoding", e.what());
590  return;
591  }
592 
593  this->setCursor(Qt::ArrowCursor);
594 
595  accept();
596 }
597 
599 {
600  reject();
601 }
602 
603 void te::addressgeocoding::MainWindowDialog::GetAddressFilePathToSettings(std::map<std::string, std::vector<std::string> >& mapFields)
604 {
605  QSettings sett(QSettings::IniFormat, QSettings::UserScope, qApp->organizationName(), qApp->applicationName());
606 
607  sett.beginGroup("Address Geocoding");
608  QStringList lst = sett.childGroups();
609 
610  QStringList::iterator it;
611 
612  for(it=lst.begin(); it != lst.end(); ++it)
613  {
614  QString gr = *it;
615 
616  sett.beginGroup(gr);
617 
618  std::vector<std::string> vecFields;
619 
620  std::string fileName = sett.value("fileName").toString().toUtf8().data();
621  vecFields.push_back(sett.value("filePath").toString().toUtf8().data());
622  vecFields.push_back(sett.value("neighborhood").toString().toUtf8().data());
623  vecFields.push_back(sett.value("number").toString().toUtf8().data());
624  vecFields.push_back(sett.value("postalCode").toString().toUtf8().data());
625  vecFields.push_back(sett.value("streetName").toString().toUtf8().data());
626  vecFields.push_back(sett.value("streetTitle").toString().toUtf8().data());
627  vecFields.push_back(sett.value("streetType").toString().toUtf8().data());
628 
629  mapFields.insert(std::pair<std::string, std::vector<std::string> >(fileName, vecFields));
630 
631  sett.endGroup();
632  }
633  sett.endGroup();
634 }
635 
637 {
638  if(QString(filePath.c_str()).isEmpty())
639  return;
640 
641  QFileInfo info(QString(filePath.c_str()));
642  te::qt::widgets::AddFilePathToSettings(info.absolutePath(), "tabular");
643 
644  //Getting the connection info
645  std::string ogrInfo("connection_string=" + filePath);
646  std::string connInfo("file://" + filePath);
647 
648  boost::filesystem::path uri(filePath);
649  std::string file = uri.stem().string();
650 
651  //Creating a DataSource
652  static boost::uuids::basic_random_generator<boost::mt19937> gen;
653  boost::uuids::uuid u = gen();
654 
656  dsInfo->setConnInfo(connInfo);
657  dsInfo->setId(boost::uuids::to_string(u));
658  dsInfo->setTitle(filePath);
659  dsInfo->setDescription("");
660  dsInfo->setAccessDriver("OGR");
661  dsInfo->setType("OGR");
662 
664 
665  m_addressDataSource = te::da::DataSourceFactory::make(dsInfo->getAccessDriver(), connInfo);
666 
667  m_addressDataSource->setId(boost::uuids::to_string(u));
668  m_addressDataSource->open();
669 }
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)
static bool exists(const std::string &path)
Checks if a given path in UTF-8 exists.
Definition: FileSystem.cpp:142
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
boost::shared_ptr< DataSource > DataSourcePtr
void setDataSource(te::da::DataSourcePtr dataSource)
TEQTWIDGETSEXPORT void AddFilePathToSettings(const QString &path, const QString &typeFile)
Save last used path in QSettings.
std::unique_ptr< Ui::MainWindowDialogForm > m_ui
static te::dt::Date ds(2010, 01, 01)
std::list< te::map::AbstractLayerPtr > m_layers
List of layers.
void setStreetPostalCode(std::string streetPostalCode)
void setStreetNeighborhood(std::string streetNeighborhood)
std::vector< std::string > m_associatedProps
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
A dialog configure the input layer to address geocoding operation.
static DataSourceManager & getInstance()
It returns a reference to the singleton instance.
A dialog to import table with address to geocoding operation.
URI C++ Library.
Definition: Attributes.h:37
static te::dt::TimeDuration dt(20, 30, 50, 11)
te::da::DataSourceInfoPtr m_outputDatasource
DataSource information.
te::map::AbstractLayerPtr m_resultLayer
Generated Layer.
te::map::AbstractLayerPtr m_newColumnLayer
Layer used for tsVector column.
MainWindowDialog(QWidget *parent=0, Qt::WindowFlags f=0)
void GetAddressFilePathToSettings(std::map< std::string, std::vector< std::string > > &mapFields)
const std::list< te::da::DataSourceInfoPtr > & getSelecteds() const
void GetAddressDataSource(std::string fileName)
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
A dialog for selecting a data source.
A class that represents a data source component.
te::map::AbstractLayerPtr getLayer()
Get the generated layer.
A layer with reference to a dataset.
Definition: DataSetLayer.h:47
TEQTWIDGETSEXPORT QString GetFilePathFromSettings(const QString &typeFile)
Returns the value of the last saved file path for the typeFile required.
std::map< std::string, std::vector< std::string > > m_mapFields
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
virtual const std::string & getDataSourceId() const
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 $
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
te::map::AbstractLayerPtr m_selectedLayer
List of layers.