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 |
Class with methods to manage and manipulate rasters.
Definition at line 44 of file RasterManager.h.
| te::tools::rastermanager::RasterManager::RasterManager | ( | ) |
Definition at line 44 of file RasterManager.cpp.
References m_loadPlugin.
| bool te::tools::rastermanager::RasterManager::changeResolution | ( | std::string | output, |
| int | method, | ||
| int | scale, | ||
| std::string & | errorMessage | ||
| ) |
Change Raster resolution.
| output | Output raster path |
| method | Integer with the method used to change the resolution 1 for Nearest Neighbor method 2 for Bilinear method 3 for Bicubic method |
| errorMessage | String that receive methods errors description |
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.
| output | Output raster path |
| extension | String with the extrenson to convert |
| bandVec | Integer vector with the bands to copy |
| errorMessage | String that receive methods errors description |
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.
| output | Output raster path |
| bandVec | Integer vector with the bands to copy |
| bandType | Define witch type the output raster will have |
| errorMessage | String that receive methods errors description |
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::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 | ||
| ) |
Show raster informations.
| output | Buffer with the informations |
| errorMessage | String that receive methods errors description |
Definition at line 176 of file RasterManager.cpp.
References te::common::Convert2String(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfBands(), te::rst::Band::getProperty(), te::tools::rastermanager::Utils::getRaster(), te::rst::BandProperty::getType(), te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, and te::rst::Raster::toString().
Referenced by main().
| bool te::tools::rastermanager::RasterManager::getSupportedExtensions | ( | std::vector< std::string > & | extents, |
| std::string & | errorMessage | ||
| ) |
Get Supported Extensions.
| extents | String vector with the supported extensions |
| errorMessage | String that receive methods errors description |
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.
| input | Input raster path |
| errorMessage | String that receive methods errors description |
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.
| output | Output raster path |
| srid | Srid code to resproject |
| errorMessage | String that receive methods errors description |
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 | ) |
Show Supported Extensions.
| errorMessage | String that receive methods errors description |
Definition at line 316 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::tools::rastermanager::Utils::loadModules().
Referenced by main().
| bool te::tools::rastermanager::RasterManager::trim | ( | std::string | output, |
| std::vector< double > | env, | ||
| std::string & | errorMessage | ||
| ) |
Trim a raster.
| output | Output raster path |
| env | Double vector with the new envelope (box) |
| errorMessage | String that receive methods errors description |
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().
|
private |
The input raster path.
Definition at line 151 of file RasterManager.h.
|
private |
Definition at line 152 of file RasterManager.h.
Referenced by RasterManager().