This is an old revision of the document!


Creating an operator

TerraAIDA project aims to build InterIMAGE operators using the TerraLib library following the GNU LGLP license model. More information at http://www.dpi.inpe.br/terraaida/.

This page will present an example of how to create your own InterIMAGE operator, using TerraLib.

After created, your operator must have two files, to be inserted into InterIMAGE:

  • The binary, which will perform the implemented operation,
  • The .op file descriptor, which describes the parameters, understandable by InterIMAGE GUI.

The structure of the files should follow this example in order to run properly.

Example of Operator Main File

#include <execTAArithmetic.hpp>
#include <OpSupportFunctions.hpp>
 
#include <iostream>
 
int main( int argc, char ** argv )
{
  // if executed with no parameters
  if( argc == 1 )
  {
    std::cout << std::endl << "TerraAIDA arithmetic operator - Version " + 
      OpSupportFunctions::getTAVersion() << std::endl;
    return EXIT_SUCCESS;
  }
 
  // if executed with parameters
  return TerraAIDA::execTAArithmetic( argc, argv );
}

Navigation