GLIMSView Source Code Documentation

GtoSConverter Class Reference

#include <GtoSConverter.h>

List of all members.


Detailed Description

GtoSconverter is the middle ground between the GUI (SpreadsheetDialog) and the classes that do the actual processing.

GtoSConverter gets the input from the GUI, and builds the appropirate data structure from the data, and then outputs the result. Some error checking of input data is handled here, but nothing is handled below this level.

Author:
Erica Liszewski 2006-04-10

Definition at line 18 of file GtoSConverter.h.


Public Member Functions

 GtoSConverter (GLIMSProject *proj)
 ~GtoSConverter ()
void convert (std::string path)
void convert (std::string path, std::string delim)

Protected Member Functions

void getSelectedShapeList ()
 sets up a vector and fills it with the selected shapes.
void getSelectedShapes ()
 using the selectedShapes vectors, cubes are made that contain the selected shapes.
std::string getConversion ()
std::string getConversion (std::string delim)
 returns a string that contains the spreadsheet conversion of the shapes using the specified delimiter.
void writeConversion (std::string str, std::string path)
 Writes string to file at path.

Protected Attributes

GLIMSProjectmProj
ImageInterfacemImage
std::vector< Shape * > selectedShapes
std::vector< ImageSelectionCube * > selectedCubes
std::string outputFilePath

Constructor & Destructor Documentation

GtoSConverter::GtoSConverter ( GLIMSProject proj  ) 

Definition at line 8 of file GtoSConverter.cpp.

References ImageInterface::getInterface(), mImage, and mProj.

Here is the call graph for this function:

GtoSConverter::~GtoSConverter (  ) 

Definition at line 14 of file GtoSConverter.cpp.

References ImageInterface::destroyInterface().

Here is the call graph for this function:


Member Function Documentation

void GtoSConverter::convert ( std::string  path  ) 

Definition at line 18 of file GtoSConverter.cpp.

References getConversion(), getSelectedShapeList(), getSelectedShapes(), and outputFilePath.

Referenced by SpreadsheetDialog::doConvert().

Here is the call graph for this function:

void GtoSConverter::convert ( std::string  path,
std::string  delim 
)

Definition at line 30 of file GtoSConverter.cpp.

References getConversion(), getSelectedShapeList(), getSelectedShapes(), and outputFilePath.

Here is the call graph for this function:

void GtoSConverter::getSelectedShapeList (  )  [protected]

sets up a vector and fills it with the selected shapes.

The vector is assigned to selectedShapes abovee.

Definition at line 39 of file GtoSConverter.cpp.

References GLIMSProject::getDataset(), VectorData::getLLSet(), VectorData::getSelSet(), VectorData::getType(), mProj, selectedShapes, and SelectionSet::size().

Referenced by convert().

Here is the call graph for this function:

void GtoSConverter::getSelectedShapes (  )  [protected]

using the selectedShapes vectors, cubes are made that contain the selected shapes.

These cubes are stored in the selectedCubes vector.

Definition at line 70 of file GtoSConverter.cpp.

References ImageCube::addBands(), ImageInterface::getCubeLatLong(), ImageInterface::getHeight(), GLIMSProject::getImage(), ImageInterface::getWidth(), mImage, mProj, selectedCubes, selectedShapes, ImageSelectionCube::setSelection(), Line::size(), ImageCube::ThreeDPoint::x, ImageCube::ThreeDPoint::y, and ImageCube::ThreeDPoint::z.

Referenced by convert().

Here is the call graph for this function:

std::string GtoSConverter::getConversion (  )  [protected]

Returns:
string that contains the spreadsheet conversion of the shapes.

Definition at line 158 of file GtoSConverter.cpp.

References selectedCubes.

Referenced by convert().

std::string GtoSConverter::getConversion ( std::string  delim  )  [protected]

returns a string that contains the spreadsheet conversion of the shapes using the specified delimiter.

Parameters:
[in] delim std::string the desired delimiter
Returns:
string that contains the spreadsheet conversion of the shapes.

Definition at line 169 of file GtoSConverter.cpp.

References ImageInterface::getBandNames(), ImageInterface::getBands(), mImage, outputFilePath, and selectedCubes.

Here is the call graph for this function:

void GtoSConverter::writeConversion ( std::string  str,
std::string  path 
) [protected]

Writes string to file at path.

Parameters:
[in] str std::string the string to write
[in] path std::string the path to write too
Returns:
string that contains the spreadsheet conversion of the shapes.

Definition at line 204 of file GtoSConverter.cpp.


Member Data Documentation

Definition at line 27 of file GtoSConverter.h.

Referenced by getSelectedShapeList(), getSelectedShapes(), and GtoSConverter().

Definition at line 28 of file GtoSConverter.h.

Referenced by getConversion(), getSelectedShapes(), and GtoSConverter().

std::vector<Shape *> GtoSConverter::selectedShapes [protected]

Definition at line 29 of file GtoSConverter.h.

Referenced by getSelectedShapeList(), and getSelectedShapes().

Definition at line 30 of file GtoSConverter.h.

Referenced by getConversion(), and getSelectedShapes().

std::string GtoSConverter::outputFilePath [protected]

Definition at line 31 of file GtoSConverter.h.

Referenced by convert(), and getConversion().


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

Home | Search | Disclaimers & Privacy | Contact Us
GLIMSView Maintainer: dsoltesz@usgs.gov