All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::sa::SpatialWeightsExchanger Class Reference

This class defines functions used to load and save gpm's using GAL and GWT formats, both formats use a ' ' as separator. More...

#include <SpatialWeightsExchanger.h>

Public Member Functions

void exportToGAL (te::sa::GeneralizedProximityMatrix *gpm, std::string pathFileName)
 Function used to export a gpm to Spatial Weights File GAL Format. More...
 
void exportToGWT (te::sa::GeneralizedProximityMatrix *gpm, std::string pathFileName, int distAttrIdx)
 Function used to export a gpm to Spatial Weights File GWT Format. More...
 
te::sa::GeneralizedProximityMatriximportFromGAL (std::string pathFileName, te::da::DataSource *ds=0)
 Function used to import a gpm from a Spatial Weights File GAL Format. More...
 
te::sa::GeneralizedProximityMatriximportFromGWT (std::string pathFileName, te::da::DataSource *ds=0)
 Function used to import a gpm from a Spatial Weights File GWT Format. More...
 
 SpatialWeightsExchanger ()
 Default constructor. More...
 
 ~SpatialWeightsExchanger ()
 Virtual destructor. More...
 

Static Public Member Functions

static void getSpatialWeightsFileInfo (std::string pathFileName, std::string &dataSetName, std::string &attrName)
 Function used to get information of how a Spatial Weights was generated. More...
 

Protected Member Functions

void associateGeometry (te::sa::GeneralizedProximityMatrix *gpm, te::da::DataSource *ds)
 Function used to associate the geometry coord attribute to vertex objects. More...
 
int getEdgeId ()
 Function used to generated the edge id. More...
 

Private Attributes

int m_edgeId
 Attribute used as a index counter for edge objects. More...
 

Detailed Description

This class defines functions used to load and save gpm's using GAL and GWT formats, both formats use a ' ' as separator.

Definition at line 74 of file SpatialWeightsExchanger.h.

Constructor & Destructor Documentation

te::sa::SpatialWeightsExchanger::SpatialWeightsExchanger ( )

Default constructor.

Definition at line 78 of file SpatialWeightsExchanger.cpp.

te::sa::SpatialWeightsExchanger::~SpatialWeightsExchanger ( )

Virtual destructor.

Definition at line 82 of file SpatialWeightsExchanger.cpp.

Member Function Documentation

void te::sa::SpatialWeightsExchanger::exportToGWT ( te::sa::GeneralizedProximityMatrix gpm,
std::string  pathFileName,
int  distAttrIdx 
)
int te::sa::SpatialWeightsExchanger::getEdgeId ( )
protected

Function used to generated the edge id.

Returns
Integer value as ID

Definition at line 573 of file SpatialWeightsExchanger.cpp.

void te::sa::SpatialWeightsExchanger::getSpatialWeightsFileInfo ( std::string  pathFileName,
std::string &  dataSetName,
std::string &  attrName 
)
static

Function used to get information of how a Spatial Weights was generated.

Parameters
pathFileNamePath and file name (with extension) with Spatial Weights information.
dataSetNameInformation about the dataset used to generate this file.
attrNameInformation about the attribute used to generate this file.
Returns
A Valid gpm pointer if the file was correctly readed and null pointer in other case.

Definition at line 546 of file SpatialWeightsExchanger.cpp.

Referenced by te::sa::SpatialStatisticsDialog::onGPMToolButtonClicked(), te::sa::BayesLocalDialog::onGPMToolButtonClicked(), and te::sa::SkaterDialog::onGPMToolButtonClicked().

te::sa::GeneralizedProximityMatrix * te::sa::SpatialWeightsExchanger::importFromGAL ( std::string  pathFileName,
te::da::DataSource ds = 0 
)

Member Data Documentation

int te::sa::SpatialWeightsExchanger::m_edgeId
private

Attribute used as a index counter for edge objects.

Definition at line 160 of file SpatialWeightsExchanger.h.


The documentation for this class was generated from the following files: