#include <GtoSConverter.h>
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.
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 | |
GLIMSProject * | mProj |
ImageInterface * | mImage |
std::vector< Shape * > | selectedShapes |
std::vector< ImageSelectionCube * > | selectedCubes |
std::string | outputFilePath |
GtoSConverter::GtoSConverter | ( | GLIMSProject * | proj | ) |
Definition at line 8 of file GtoSConverter.cpp.
References ImageInterface::getInterface(), mImage, and mProj.
GtoSConverter::~GtoSConverter | ( | ) |
Definition at line 14 of file GtoSConverter.cpp.
References ImageInterface::destroyInterface().
void GtoSConverter::convert | ( | std::string | path | ) |
Definition at line 18 of file GtoSConverter.cpp.
References getConversion(), getSelectedShapeList(), getSelectedShapes(), and outputFilePath.
Referenced by SpreadsheetDialog::doConvert().
void GtoSConverter::convert | ( | std::string | path, | |
std::string | delim | |||
) |
Definition at line 30 of file GtoSConverter.cpp.
References getConversion(), getSelectedShapeList(), getSelectedShapes(), and outputFilePath.
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().
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().
std::string GtoSConverter::getConversion | ( | ) | [protected] |
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.
[in] | delim | std::string the desired delimiter |
Definition at line 169 of file GtoSConverter.cpp.
References ImageInterface::getBandNames(), ImageInterface::getBands(), mImage, outputFilePath, and selectedCubes.
void GtoSConverter::writeConversion | ( | std::string | str, | |
std::string | path | |||
) | [protected] |
Writes string to file at path.
[in] | str | std::string the string to write |
[in] | path | std::string the path to write too |
Definition at line 204 of file GtoSConverter.cpp.
GLIMSProject* GtoSConverter::mProj [protected] |
Definition at line 27 of file GtoSConverter.h.
Referenced by getSelectedShapeList(), getSelectedShapes(), and GtoSConverter().
ImageInterface* GtoSConverter::mImage [protected] |
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().
std::vector<ImageSelectionCube *> GtoSConverter::selectedCubes [protected] |
Definition at line 30 of file GtoSConverter.h.
Referenced by getConversion(), and getSelectedShapes().
std::string GtoSConverter::outputFilePath [protected] |
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |