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.

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

Virtual destructor.

Member Function Documentation

void te::sa::SpatialWeightsExchanger::associateGeometry ( te::sa::GeneralizedProximityMatrix gpm,
te::da::DataSource ds 
)
protected

Function used to associate the geometry coord attribute to vertex objects.

Parameters
gPointer to a valid graph
dsPointer to a valid data source
void te::sa::SpatialWeightsExchanger::exportToGAL ( te::sa::GeneralizedProximityMatrix gpm,
std::string  pathFileName 
)

Function used to export a gpm to Spatial Weights File GAL Format.

Parameters
gpmPointer to a valid graph
pathFileNamePath and file name (with extension) for file creation.
void te::sa::SpatialWeightsExchanger::exportToGWT ( te::sa::GeneralizedProximityMatrix gpm,
std::string  pathFileName,
int  distAttrIdx 
)

Function used to export a gpm to Spatial Weights File GWT Format.

Parameters
gpmPointer to a valid graph
pathFileNamePath and file name (with extension) for file creation.
distAttrIdxEdge Atrribute index with distance information
int te::sa::SpatialWeightsExchanger::getEdgeId ( )
protected

Function used to generated the edge id.

Returns
Integer value as ID
static 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.
te::sa::GeneralizedProximityMatrix* te::sa::SpatialWeightsExchanger::importFromGAL ( std::string  pathFileName,
te::da::DataSource ds = 0 
)

Function used to import a gpm from a Spatial Weights File GAL Format.

Parameters
pathFileNamePath and file name (with extension) with Spatial Weights information.
dsPointer to a datasource in case the gal file has the shapefile information.
Returns
A Valid gpm pointer if the file was correctly readed and null pointer in other case.
te::sa::GeneralizedProximityMatrix* te::sa::SpatialWeightsExchanger::importFromGWT ( std::string  pathFileName,
te::da::DataSource ds = 0 
)

Function used to import a gpm from a Spatial Weights File GWT Format.

Parameters
pathFileNamePath and file name (with extension) with Spatial Weights information.
dsPointer to a datasource in case the gwt file has the shapefile information.
Returns
A Valid gpm pointer if the file was correctly readed and null pointer in other case.

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 file: