15 std::cout <<
"Example of arithmetic operations using bands of a Raster." << std::endl << std::endl;
18 std::map<std::string, std::string> rinfo;
19 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
31 std::map<std::string, std::string> orinfo;
32 orinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/arithmetic_operations_result.tif";
43 if(!algorithmInstance.
execute(outputParams))
49 std::cout << rout->toString();
51 catch(
const std::exception& e)
53 std::cout << std::endl <<
"An exception has occurred in ArithmeticOperations(): " << e.what() << std::endl;
57 std::cout << std::endl <<
"An unexpected exception has occurred in ArithmeticOperations()!" << std::endl;
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
These routines show how to use the RP (raster processing) module.
bool execute(AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false)
Executes the algorithm using the supplied parameters.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
bool initialize(const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false)
Initialize the algorithm instance making it ready for execution.
ArithmeticOperations output parameters.
This file contains include headers for the TerraLib Raster Processing module.
void ArithmeticOperations()
void reset() _NOEXCEPT_OP(false)
Clear all internal allocated resources and reset the parameters instance to its initial state...
Performs arithmetic operation over raster data.
static Raster * open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
It opens a raster with the given parameters and default raster driver.