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, describing the parameters, understandable by InterIMAGE GUI.

In this page we describe how to create the source-code of the operator. For information about how to define your .op file descriptor, read the Section “3.1. Operator Description File”, in the System Overview Operation Guide.

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