All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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(), and te::rst::Raster::resample().

Referenced by main().

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 te::tools::rastermanager::Utils::getRaster().

Referenced by main().

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

Copy a raster.

Parameters
outputOutput raster path
bandVecInteger vector with the bands to copy
bandTypeDefine witch type the output raster will have
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 67 of file RasterManager.cpp.

References te::tools::rastermanager::Utils::checkOutputPath(), te::common::Convert2String(), te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::tools::rastermanager::Utils::getRaster(), te::rst::Raster::getValue(), te::rst::Raster::getValues(), te::sa::Grid, te::rst::RasterFactory::make(), te::rst::Raster::setValue(), and te::rst::Raster::setValues().

Referenced by main().

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, te::common::FactoryDictionary< TFACTORY, TFACTORYKEY, TKEYCOMPARE >::end(), te::common::AbstractFactory< TPRODUCT, TFACTORYKEY, TKEYCOMPARE >::getDictionary(), and te::common::Tokenize().

bool te::tools::rastermanager::RasterManager::init ( std::string  input,
std::string &  errorMessage 
)

Init the application.

Parameters
inputInput raster path
errorMessageString that receive methods errors description
Returns
True if successfully

Definition at line 49 of file RasterManager.cpp.

References te::tools::rastermanager::Utils::checkInputPath(), and te::tools::rastermanager::Utils::loadModules().

Referenced by main().

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(), and te::rst::Reproject().

Referenced by main().

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(), and te::rst::Raster::trim().

Referenced by main().

Member Data Documentation

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

The input raster path.

Definition at line 151 of file RasterManager.h.

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

Definition at line 152 of file RasterManager.h.

Referenced by RasterManager().


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