te::tools::rastermanager::RasterManager Class Reference

Class with methods to manage and manipulate rasters. More...

#include <RasterManager.h>

Public Member Functions

bool changeResolution (std::string output, int method, int scale, std::string &errorMessage)
 Change Raster resolution. More...
 
bool convert (std::string output, std::string extension, std::vector< int > bandVec, std::string &errorMessage)
 Convert a raster. More...
 
bool copyRaster (std::string output, std::vector< int > bandVec, int bandType, std::string &errorMessage)
 Copy a raster. More...
 
bool getRasterInfo (std::ostringstream &output, std::string &errorMessage)
 Show raster informations. More...
 
bool getSupportedExtensions (std::vector< std::string > &extents, std::string &errorMessage)
 Get Supported Extensions. More...
 
bool init (std::string input, std::string &errorMessage)
 Init the application. More...
 
 RasterManager ()
 
bool reproject (std::string output, int srid, std::string &errorMessage)
 Reproject a raster. More...
 
bool showSupportedExtensions (std::string &errorMessage)
 Show Supported Extensions. More...
 
bool trim (std::string output, std::vector< double > env, std::string &errorMessage)
 Trim a raster. More...
 

Private Attributes

std::string m_input
 The input raster path. More...
 
bool m_loadPlugin
 

Detailed Description

Class with methods to manage and manipulate rasters.

Definition at line 44 of file RasterManager.h.

Constructor & Destructor Documentation

te::tools::rastermanager::RasterManager::RasterManager ( )

Definition at line 44 of file RasterManager.cpp.

References m_loadPlugin.

Member Function Documentation

bool te::tools::rastermanager::RasterManager::changeResolution ( std::string  output,
int  method,
int  scale,
std::string &  errorMessage 
)

Change Raster resolution.

Parameters
outputOutput raster path
methodInteger with the method used to change the resolution 1 for Nearest Neighbor method 2 for Bilinear method 3 for Bicubic method
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 259 of file RasterManager.cpp.

References te::tools::rastermanager::Utils::checkOutputPath(), te::tools::rastermanager::Utils::getRaster(), m_input, and te::rst::Raster::resample().

Referenced by main(), and te::tools::rastermanager::RasterManagerDialog::resolutionPushButton_clicked().

bool te::tools::rastermanager::RasterManager::convert ( std::string  output,
std::string  extension,
std::vector< int bandVec,
std::string &  errorMessage 
)

Convert a raster.

Parameters
outputOutput raster path
extensionString with the extrenson to convert
bandVecInteger vector with the bands to copy
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 210 of file RasterManager.cpp.

References copyRaster(), te::tools::rastermanager::Utils::getRaster(), and m_input.

Referenced by te::tools::rastermanager::RasterManagerDialog::convertPushButton_clicked(), and main().

bool te::tools::rastermanager::RasterManager::copyRaster ( std::string  output,
std::vector< int bandVec,
int  bandType,
std::string &  errorMessage 
)
bool te::tools::rastermanager::RasterManager::getRasterInfo ( std::ostringstream &  output,
std::string &  errorMessage 
)
bool te::tools::rastermanager::RasterManager::getSupportedExtensions ( std::vector< std::string > &  extents,
std::string &  errorMessage 
)

Get Supported Extensions.

Parameters
extentsString vector with the supported extensions
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 346 of file RasterManager.cpp.

References te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::begin(), capabilities, d, te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::end(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary(), and te::common::Tokenize().

Referenced by te::tools::rastermanager::RasterManagerDialog::inputPushButton_clicked().

bool te::tools::rastermanager::RasterManager::reproject ( std::string  output,
int  srid,
std::string &  errorMessage 
)

Reproject a raster.

Parameters
outputOutput raster path
sridSrid code to resproject
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 151 of file RasterManager.cpp.

References te::tools::rastermanager::Utils::checkOutputPath(), te::tools::rastermanager::Utils::getRaster(), m_input, and te::rst::Reproject().

Referenced by main(), and te::tools::rastermanager::RasterManagerDialog::reprojectPushButton_clicked().

bool te::tools::rastermanager::RasterManager::showSupportedExtensions ( std::string &  errorMessage)
bool te::tools::rastermanager::RasterManager::trim ( std::string  output,
std::vector< double >  env,
std::string &  errorMessage 
)

Trim a raster.

Parameters
outputOutput raster path
envDouble vector with the new envelope (box)
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 290 of file RasterManager.cpp.

References te::tools::rastermanager::Utils::checkOutputPath(), te::rst::Raster::getExtent(), te::tools::rastermanager::Utils::getRaster(), m_input, and te::rst::Raster::trim().

Referenced by main(), and te::tools::rastermanager::RasterManagerDialog::trimPushButton_clicked().

Member Data Documentation

std::string te::tools::rastermanager::RasterManager::m_input
private

The input raster path.

Definition at line 151 of file RasterManager.h.

Referenced by changeResolution(), convert(), copyRaster(), getRasterInfo(), init(), reproject(), and trim().

bool te::tools::rastermanager::RasterManager::m_loadPlugin
private

Definition at line 152 of file RasterManager.h.

Referenced by init(), and RasterManager().


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