SpatialStatisticsDialog.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/sa/qt/SpatialStatisticsDialog.cpp
22 
23  \brief A dialog to calculate spatial statistics from a attribute of a dataset.
24 */
25 
26 // TerraLib
27 #include "../../core/logger/Logger.h"
28 #include "../../common/progress/ProgressManager.h"
29 #include "../../core/translator/Translator.h"
30 #include "../../common/STLUtils.h"
31 #include "../../dataaccess/datasource/DataSource.h"
32 #include "../../dataaccess/utils/Utils.h"
33 #include "../../geometry/GeometryProperty.h"
34 #include "../../maptools/DataSetLayer.h"
35 #include "../../qt/widgets/datasource/selector/DataSourceSelectorDialog.h"
36 #include "../../qt/widgets/progress/ProgressViewerDialog.h"
37 #include "../core/GPMBuilder.h"
38 #include "../core/GPMConstructorAdjacencyStrategy.h"
39 #include "../core/GPMWeightsNoWeightsStrategy.h"
40 #include "../core/SpatialStatisticsFunctions.h"
41 #include "../core/SpatialWeightsExchanger.h"
42 #include "../core/StatisticsFunctions.h"
43 #include "../core/Utils.h"
44 #include "../Exception.h"
46 #include "Utils.h"
47 #include "ui_SpatialStatisticsDialogForm.h"
48 
49 // Qt
50 #include <QFileDialog>
51 #include <QFileInfo>
52 #include <QMessageBox>
53 #include <QValidator>
54 
55 // STL
56 #include <memory>
57 
58 //Boost
59 #include <boost/filesystem.hpp>
60 
62 
63 te::sa::SpatialStatisticsDialog::SpatialStatisticsDialog(QWidget* parent, Qt::WindowFlags f)
64  : QDialog(parent, f),
65  m_ui(new Ui::SpatialStatisticsDialogForm)
66 {
67 // add controls
68  m_ui->setupUi(this);
69 
70 // add icons
71  m_ui->m_imgLabel->setPixmap(QIcon::fromTheme("sa-spatialstatistics-hint").pixmap(112,48));
72  m_ui->m_gpmToolButton->setIcon(QIcon::fromTheme("folder-open"));
73  m_ui->m_targetDatasourceToolButton->setIcon(QIcon::fromTheme("datasource"));
74 
75 // connectors
76  connect(m_ui->m_inputLayerComboBox, SIGNAL(activated(int)), this, SLOT(onInputLayerComboBoxActivated(int)));
77  connect(m_ui->m_gpmToolButton, SIGNAL(clicked()), this, SLOT(onGPMToolButtonClicked()));
78  connect(m_ui->m_okPushButton, SIGNAL(clicked()), this, SLOT(onOkPushButtonClicked()));
79  connect(m_ui->m_targetDatasourceToolButton, SIGNAL(pressed()), this, SLOT(onTargetDatasourceToolButtonPressed()));
80  connect(m_ui->m_targetFileToolButton, SIGNAL(pressed()), this, SLOT(onTargetFileToolButtonPressed()));
81 
82 // help info
83  m_ui->m_helpPushButton->setNameSpace("dpi.inpe.br.plugins");
84  m_ui->m_helpPushButton->setPageReference("plugins/sa/sa_spatialstatistics.html");
85 }
86 
88 
89 void te::sa::SpatialStatisticsDialog::setLayers(std::list<te::map::AbstractLayerPtr> layers)
90 {
91  std::list<te::map::AbstractLayerPtr>::iterator it = layers.begin();
92 
93  while(it != layers.end())
94  {
96 
97  if(l->isValid())
98  {
99  std::unique_ptr<te::da::DataSetType> dsType = l->getSchema();
100 
101  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(l.get());
102 
103  if(dsLayer && dsType->hasGeom())
104  m_ui->m_inputLayerComboBox->addItem(it->get()->getTitle().c_str(), QVariant::fromValue(l));
105  }
106 
107  ++it;
108  }
109 
110 // fill attributes combo
111  if(m_ui->m_inputLayerComboBox->count() > 0)
113 }
114 
116 {
117  return m_outputLayer;
118 }
119 
121 {
122  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(index, Qt::UserRole);
123 
125 
126  std::unique_ptr<te::da::DataSetType> dsType = l->getSchema();
127 
128  std::vector<te::dt::Property*> propVec = dsType->getProperties();
129 
130  m_ui->m_attrIdComboBox->clear();
131  m_ui->m_attrLinkComboBox->clear();
132 
133  for(std::size_t t = 0; t < propVec.size(); ++t)
134  {
135  int dataType = propVec[t]->getType();
136 
137  if (dataType == te::dt::INT16_TYPE || dataType == te::dt::UINT16_TYPE ||
138  dataType == te::dt::INT32_TYPE || dataType == te::dt::UINT32_TYPE ||
139  dataType == te::dt::INT64_TYPE || dataType == te::dt::UINT64_TYPE ||
140  dataType == te::dt::FLOAT_TYPE || dataType == te::dt::DOUBLE_TYPE)
141  {
142  m_ui->m_attrIdComboBox->addItem(propVec[t]->getName().c_str(), dataType);
143  }
144 
145  m_ui->m_attrLinkComboBox->addItem(propVec[t]->getName().c_str(), dataType);
146  }
147 }
148 
150 {
151  QString fileName = QFileDialog::getOpenFileName(this, tr("Open Generalized Proximity Matrix File"), "", tr("GAL Files (*.gal *.GAL);; GWT Files (*.gwt *.GWT)"));
152 
153  if(fileName.isEmpty())
154  return;
155 
156  //get selected layer
157  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(m_ui->m_inputLayerComboBox->currentIndex(), Qt::UserRole);
159  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(l.get());
160 
161  //check if the selected gpm is valid for selected layer
162  std::string path = fileName.toUtf8().data();
163  std::string dataSetName;
164  std::string attrName;
165 
167 
168  if(dsLayer->getDataSetName() != dataSetName)
169  {
170  QMessageBox::warning(this, tr("Warning"), tr("Invalid GPM file for selected layer."));
171  return;
172  }
173 
174  if(m_ui->m_attrLinkComboBox->currentText().toUtf8().data() != attrName)
175  {
176  QMessageBox::warning(this, tr("Warning"), tr("Invalid GPM file for selected Attr Link."));
177  return;
178  }
179 
180  m_ui->m_gpmLineEdit->setText(fileName);
181 }
182 
184 {
185  // check input parameters
186  if(m_ui->m_repositoryLineEdit->text().isEmpty())
187  {
188  QMessageBox::information(this, tr("Warning"), tr("Define a repository for the result."));
189  return;
190  }
191 
192  if(m_ui->m_newLayerNameLineEdit->text().isEmpty())
193  {
194  QMessageBox::information(this, tr("Warning"), tr("Define a name for the resulting layer."));
195  return;
196  }
197 
198  if(m_ui->m_attrIdComboBox->currentText().isEmpty())
199  {
200  QMessageBox::information(this, tr("Warning"), tr("Attribute Name not defined."));
201  return;
202  }
203 
204  //get GPM
205  std::unique_ptr<te::sa::GeneralizedProximityMatrix> gpm;
206 
207  try
208  {
209  gpm = loadGPM();
210  }
211  catch(...)
212  {
213  QMessageBox::warning(this, tr("Warning"), tr("Internal error. GPM not loaded."));
214  return;
215  }
216 
217  if(!gpm.get())
218  return;
219 
220  //get selected layer
221  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(m_ui->m_inputLayerComboBox->currentIndex(), Qt::UserRole);
223  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(l.get());
224 
225  //get necessary info to calculate statistics
226  te::da::DataSourcePtr ds = te::da::GetDataSource(dsLayer->getDataSourceId(), true);
227 
228  std::unique_ptr<te::da::DataSetType> dataSetType = l->getSchema();
229 
230  std::string attrLink = gpm->getAttributeName();
231 
232  std::string attrName = m_ui->m_attrIdComboBox->currentText().toUtf8().data();
233 
234  int type = m_ui->m_attrIdComboBox->itemData(m_ui->m_attrIdComboBox->currentIndex()).toInt();
235 
236  //associate the selected attribute to the GPM
237  int attrIdx = te::sa::AssociateGPMVertexAttribute(gpm.get(), ds.get(), dsLayer->getDataSetName(), attrLink, attrName, type);
238 
239  //start calculate the operations
241 
242  QApplication::setOverrideCursor(Qt::WaitCursor);
243 
244  //G Statistics
245  if(m_ui->m_localGStatisticsCheckBox->isChecked())
246  {
247  try
248  {
249  te::sa::GStatistics(gpm.get(), attrIdx); //this function calculates the g and g* statistics and adds the values as attribute in each vertex from gpm graph.
250  }
251  catch(const std::exception& e)
252  {
253  QMessageBox::warning(this, tr("Warning"), e.what());
254 
255  QApplication::restoreOverrideCursor();
256 
257  return;
258  }
259  catch(...)
260  {
261  QMessageBox::warning(this, tr("Warning"), tr("Internal error. G Statistics not calculated."));
262 
263  QApplication::restoreOverrideCursor();
264 
265  return;
266  }
267  }
268 
269  //Local Mean
270  if(m_ui->m_localLocalMeanCheckBox->isChecked())
271  {
272  try
273  {
274  te::sa::LocalMean(gpm.get(), attrIdx); //this function calculates the local mean statistics and adds the values as attribute in each vertex from gpm graph.
275  }
276  catch(const std::exception& e)
277  {
278  QMessageBox::warning(this, tr("Warning"), e.what());
279 
280  QApplication::restoreOverrideCursor();
281 
282  return;
283  }
284  catch(...)
285  {
286  QMessageBox::warning(this, tr("Warning"), tr("Internal error. Local Mean not calculated."));
287 
288  QApplication::restoreOverrideCursor();
289 
290  return;
291  }
292  }
293 
294  //Moran
295  if(m_ui->m_globalMoranIndexCheckBox->isChecked() || m_ui->m_localMoranIndex->isChecked())
296  {
297  try
298  {
299  te::sa::ZAndWZ(gpm.get(), attrIdx); //this function calculates the standard deviation Z and local mean of the desviation Z (WZ).
300 
301  double globalMoranIndex = te::sa::MoranIndex(gpm.get()); //this function calculates the moran index, global and local.
302 
303  //set the global moran index value
304  if(m_ui->m_globalMoranIndexCheckBox->isChecked())
305  {
306  m_ui->m_globalMoranIndexValueLineEdit->setText(QString::number(globalMoranIndex));
307  }
308 
309  //evaluating the significance of the global index.
310  if(m_ui->m_globalMoranIndexCheckBox->isChecked() && !m_ui->m_globalEvalNotRadioButton->isChecked())
311  {
312  int permutValue = 0;
313 
314  if(m_ui->m_globalEval99RadioButton->isChecked())
315  permutValue = 99;
316  else if(m_ui->m_globalEval999RadioButton->isChecked())
317  permutValue = 999;
318 
319  double globalMoranSignificance = te::sa::GlobalMoranSignificance(gpm.get(), attrIdx, permutValue, globalMoranIndex); //this function calculates the significance of the moran index.
320 
321  m_ui->m_globalMoranIndexPValueLineEdit->setText(QString::number(globalMoranSignificance));
322  }
323 
324  te::sa::BoxMap(gpm.get(), 0); //this function calculates the box map information, needs Z and WZ information... MEAN = 0 ??
325 
326  //evaluating the significance of LISA.
327  if(m_ui->m_localMoranIndex->isChecked() && !m_ui->m_localEvalNotRadioButton->isChecked())
328  {
329  int permutValue = 0;
330 
331  if(m_ui->m_localEval99RadioButton->isChecked())
332  permutValue = 99;
333  else if(m_ui->m_localEval999RadioButton->isChecked())
334  permutValue = 999;
335  else if(m_ui->m_localEval9999RadioButton->isChecked())
336  permutValue = 9999;
337 
338  te::sa::LisaStatisticalSignificance(gpm.get(), permutValue); //this function calculates the lisa (local moran index) significance, needs Z, Local Moran and Number of Neighbours attributes calculated.
339 
340  te::sa::LISAMap(gpm.get(), permutValue); //this function calculates the lisa map, needs LISASig attribute calculated.
341 
342  te::sa::MoranMap(gpm.get()); //this function calculates the moran map, needs LISAMap and BoxMAP attributes calculated.
343  }
344  }
345  catch(const std::exception& e)
346  {
347  QMessageBox::warning(this, tr("Warning"), e.what());
348 
349  QApplication::restoreOverrideCursor();
350 
351  return;
352  }
353  catch(...)
354  {
355  QMessageBox::warning(this, tr("Warning"), tr("Internal error. Moran not calculated."));
356 
357  QApplication::restoreOverrideCursor();
358 
359  return;
360  }
361  }
362 
363  //save spatial statistics calculated into a new dataset
364  std::string dataSetName = m_ui->m_newLayerNameLineEdit->text().toUtf8().data();
365 
366  std::size_t idx = dataSetName.find(".");
367  if (idx != std::string::npos)
368  dataSetName=dataSetName.substr(0,idx);
369 
370  te::da::DataSourcePtr outputDataSource;
371 
372  if(m_toFile)
373  {
374  outputDataSource = te::sa::CreateOGRDataSource(m_ui->m_repositoryLineEdit->text().toUtf8().data());
375  }
376  else
377  {
378  outputDataSource = te::da::GetDataSource(m_outputDatasource->getId());
379  }
380 
381  //associate the input geometry attribute to the GPM
382  te::gm::GeometryProperty* gmProp = te::da::GetFirstGeomProperty(dataSetType.get());
383 
384  /*int geomIdx = */te::sa::AssociateGPMVertexAttribute(gpm.get(), ds.get(), dsLayer->getDataSetName(), attrLink, gmProp->getName(), gmProp->getType(), gmProp->getSRID(), gmProp->getGeometryType());
385 
386  try
387  {
388  gpm->toDataSource(outputDataSource, dataSetName);
389  }
390  catch(const std::exception& e)
391  {
392  QMessageBox::warning(this, tr("Warning"), e.what());
393 
394  QApplication::restoreOverrideCursor();
395 
396  return;
397  }
398  catch(...)
399  {
400  QMessageBox::warning(this, tr("Warning"), tr("Error saving GPM into data source."));
401 
402  QApplication::restoreOverrideCursor();
403 
404  return;
405  }
406 
407  QApplication::restoreOverrideCursor();
408 
409  QMessageBox::information(this, tr("Information"), tr("Statistics Calculated. Press the 'Close' button to close the dialog."));
410 
411  m_outputLayer = te::sa::CreateLayer(outputDataSource, dataSetName);
412 }
413 
414 std::unique_ptr<te::sa::GeneralizedProximityMatrix> te::sa::SpatialStatisticsDialog::loadGPM()
415 {
416  std::unique_ptr<te::sa::GeneralizedProximityMatrix> gpm;
417 
418  //get selected layer
419  QVariant varLayer = m_ui->m_inputLayerComboBox->itemData(m_ui->m_inputLayerComboBox->currentIndex(), Qt::UserRole);
421 
422  if(!l.get())
423  {
424  QMessageBox::warning(this, tr("Warning"), tr("Invalid selected layer."));
425  return gpm;
426  }
427 
428  te::map::DataSetLayer* dsLayer = dynamic_cast<te::map::DataSetLayer*>(l.get());
429 
430  //get gpm necessary parameters
432 
433  std::string dataSetName = dsLayer->getDataSetName();
434 
435  if(!m_ui->m_gpmGroupBox->isChecked())
436  {
437  //create gpm
438  if(QMessageBox::question(this, tr("Spatial Analysis"), tr("GPM not selected. Create default GPM?"), QMessageBox::No, QMessageBox::Yes) == QMessageBox::No)
439  return gpm;
440 
441  //get attrlink
442  std::unique_ptr<te::da::DataSetType> dsType = dsLayer->getSchema();
443 
444  if(!dsType->getPrimaryKey() || dsType->getPrimaryKey()->getProperties().empty())
445  {
446  QMessageBox::warning(this, tr("Warning"), tr("Invalid Data Set Primary Key."));
447  return gpm;
448  }
449 
450  std::string attrLink = dsType->getPrimaryKey()->getProperties()[0]->getName();
451 
452  //create default gpm
455 
456  te::sa::GPMBuilder builder(constructor, weights);
457 
458  builder.setGPMInfo(ds, dataSetName, attrLink);
459  builder.build();
460 
461  gpm.reset(builder.getGPM());
462  }
463  else
464  {
465  if(m_ui->m_gpmLineEdit->text().isEmpty())
466  {
467  QMessageBox::warning(this, tr("Warning"), tr("GPM File not selected."));
468  return gpm;
469  }
470 
471  //load gpm
472  QFileInfo file(m_ui->m_gpmLineEdit->text());
473 
474  std::string extension = file.suffix().toUtf8().data();
475 
477 
478  if(extension == "gal" || extension == "GAL")
479  {
480  gpm.reset(swe.importFromGAL(m_ui->m_gpmLineEdit->text().toUtf8().data(), ds.get()));
481  }
482  else if(extension == "gwt" || extension == "GWT")
483  {
484  gpm.reset(swe.importFromGWT(m_ui->m_gpmLineEdit->text().toUtf8().data(), ds.get()));
485  }
486  }
487 
488  return gpm;
489 }
490 
492 {
493  m_ui->m_newLayerNameLineEdit->clear();
494  m_ui->m_newLayerNameLineEdit->setEnabled(true);
495 
497  dlg.exec();
498 
499  std::list<te::da::DataSourceInfoPtr> dsPtrList = dlg.getSelecteds();
500 
501  if(dsPtrList.empty())
502  return;
503 
504  std::list<te::da::DataSourceInfoPtr>::iterator it = dsPtrList.begin();
505 
506  m_ui->m_repositoryLineEdit->setText(QString(it->get()->getTitle().c_str()));
507 
508  m_outputDatasource = *it;
509 
510  m_toFile = false;
511 }
512 
514 {
515  m_ui->m_newLayerNameLineEdit->clear();
516  m_ui->m_repositoryLineEdit->clear();
517 
518  QString fileName = QFileDialog::getSaveFileName(this, tr("Save as..."), QString(), tr("Shapefile (*.shp *.SHP);;"),nullptr, QFileDialog::DontConfirmOverwrite);
519 
520  if (fileName.isEmpty())
521  return;
522 
523  boost::filesystem::path outfile(fileName.toUtf8().data());
524 
525  m_ui->m_repositoryLineEdit->setText(outfile.string().c_str());
526 
527  m_ui->m_newLayerNameLineEdit->setText(outfile.leaf().string().c_str());
528 
529  m_ui->m_newLayerNameLineEdit->setEnabled(false);
530 
531  m_toFile = true;
532 }
TEDATAACCESSEXPORT DataSourcePtr GetDataSource(const std::string &datasourceId, const bool opened=true)
Search for a data source with the informed id in the DataSourceManager.
This class defines a an adjacency strategy class for a GPM constructor.
GeneralizedProximityMatrix * getGPM()
Function used to return the generated gpm.
Definition: GPMBuilder.cpp:91
Geometric property.
te::map::AbstractLayerPtr m_outputLayer
Generated Layer.
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
TESAEXPORT void MoranMap(te::sa::GeneralizedProximityMatrix *gpm)
Function used to calculate the moran map info for a gpm, classifies the objects based in the scatterp...
TESAEXPORT double GlobalMoranSignificance(te::sa::GeneralizedProximityMatrix *gpm, int attrIdx, int permutationsNumber, double moranIndex)
Function used to calculate the global moran significance.
boost::shared_ptr< DataSource > DataSourcePtr
TESAEXPORT te::da::DataSourcePtr CreateOGRDataSource(std::string repository)
bool setGPMInfo(te::da::DataSourcePtr ds, const std::string &dataSetName, const std::string &attributeName)
Function used to create an empty gpm (using a MEMORY DIRECT graph)
Definition: GPMBuilder.cpp:49
This class defines a class to calculates a weight for a GPM using No Weights strategy.
TESAEXPORT void LocalMean(te::sa::GeneralizedProximityMatrix *gpm, int attrIdx)
Function used to calculate the local mean of each vertex from gpm graph.
std::unique_ptr< LayerSchema > getSchema() const
It returns the layer schema.
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.
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.
Q_DECLARE_METATYPE(te::map::AbstractLayerPtr) te
TESAEXPORT void LisaStatisticalSignificance(te::sa::GeneralizedProximityMatrix *gpm, int permutationsNumber)
Function used to calculate LISA Statical Significance for each gpm element.
te::da::DataSourceInfoPtr m_outputDatasource
A dialog to calculate spatial statistics from a attribute of a dataset.
URI C++ Library.
Definition: Attributes.h:37
te::map::AbstractLayerPtr getOutputLayer()
TESAEXPORT void LISAMap(te::sa::GeneralizedProximityMatrix *gpm, int permutationsNumber)
Function used to calculate the lisa map info for a gpm, classifies the objects based in the statistic...
static void getSpatialWeightsFileInfo(std::string pathFileName, std::string &dataSetName, std::string &attrName)
Function used to get information of how a Spatial Weights was generated.
Utility functions for the data access module.
TESAEXPORT void BoxMap(te::sa::GeneralizedProximityMatrix *gpm, double mean)
Function used to calculate the box map info for a gpm, classifies the objects in quadrants based in t...
TESAEXPORT int AssociateGPMVertexAttribute(te::sa::GeneralizedProximityMatrix *gpm, te::da::DataSource *ds, std::string dataSetName, std::string attrLink, std::string attr, int dataType, int srid=TE_UNKNOWN_SRS, int subType=static_cast< int >(te::gm::UnknownGeometryType))
Function used to set a an attribute valeu from a dataset to the vertex objects from a gpm...
TESAEXPORT void ZAndWZ(te::sa::GeneralizedProximityMatrix *gpm, int attrIdx)
Function used to calculate the standard deviation Z and local mean of the desviation Z (WZ)...
This class defines a an Abstract class for a GPM constructor.
This class defines a an Abstract class to calculates a weight for a GPM.
const std::string & getDataSetName() const
const std::list< te::da::DataSourceInfoPtr > & getSelecteds() const
TESAEXPORT double MoranIndex(te::sa::GeneralizedProximityMatrix *gpm)
Function used to calculate the moran index, also calculates the local moran value.
TESAEXPORT te::map::AbstractLayerPtr CreateLayer(te::da::DataSourcePtr ds, std::string dataSetName)
std::unique_ptr< Ui::SpatialStatisticsDialogForm > m_ui
std::unique_ptr< te::sa::GeneralizedProximityMatrix > loadGPM()
A dialog for selecting a data source.
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.
A layer with reference to a dataset.
Definition: DataSetLayer.h:47
This class defines the GPM Builder class.
Definition: GPMBuilder.h:54
TEDATAACCESSEXPORT te::gm::GeometryProperty * GetFirstGeomProperty(const DataSetType *dt)
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TESAEXPORT void GStatistics(te::sa::GeneralizedProximityMatrix *gpm, int attrIdx)
The local spatial statistic G is calculated for each zone based on the spatial weights object used...
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 $