STA User Interaction

Basic User

For regular users, the interaction with the STA module will be done by means of a GUI via SNAP GUI.

The layout of the GUI

Regions

Operator Descriptor

This region groups the metadata fields of the operator. A description of the fields is given in the following table:

FieldTypeDescriptionRequired Remarks 
AliasStringThe alias of the operator Yes The field is used when creating the adapter folder and the Velocity template.
Unique nameStringThe unique name of the operator Yes 
LabelStringThe operator label Yes 
Version String The version of the adapter

 No

 
Copyright String The copyright string No 
Authors String The authors of the adapter No 
Description String The description of the adapter No Useful in the adapter list dialog
Menu location Choice The location of the operator menu action Yes One can choose between one of the existing menus/submenus
System Variables

This region allows adding environment variables for use with the external tool. Each of the defined variables is passed to the process executing the external tool.

Preprocessing

This region allows (optionally) selecting a preprocessing step (i.e. executing a previously defined tool adapter) and/or a conversion step (if the current tool would require products in a specific format);

Configuration Parameters

This region groups parameters related to tool description (like the location of the executable, the working directory, a command line template, etc.)

Tool Output Patterns

Allows specifying regular expressions for capturing progress and errors from the output of the external tool.

Operator Parameters

Parameters represent actual tool invocation parameters. This is a synthetic (but also editable) view. More fields are accessible and editable by clicking on the ellipsis (...) button:
 or

A parameter can have one of the following types:

  • Integer: can hold an integer value
  • Decimal: can hold a float value
  • String: can hold a text value
  • Boolean: can hold a bit/boolean value
  • File: can hold a File value; to set its value, just input the string path of the file;
  • List: can hold a list of string values;
  • Template Before: represents a Velocity template file to be interpreted before the tool execution;
  • Template After: represents a Velocity template file to be interpreted after the tool execution;
  • Template Parameter: represents a parameter of a Template Before/After file.

There are 3 special parameters that cannot be edited by the user. These parameters represent Java objects (that means one can access getters of the respective objects in the Velocity template):

ParameterTypeDescription
sourceProductProduct[]This parameter allows accessing (in the Velocity template) the source products of the operator (i.e. products already loaded into SNAP)
sourceProductFileFile[]This parameter passes to the external tool a list of source product files (i.e. products not loaded into SNAP)
targetProductFileFileThis parameter represents the resulting product file (the result of the tool execution).

An example of usage of the sourceProductFile parameter in the Velocity template:

$sourceProductFile[0].getAbsolutePath()

 Important: if you use parameters of File type, don't forget that they are Java objects. To get the file location, one must call the getAbsolutePath() accessor (or its short-hand version AbsolutePath).

Advanced User 

A user that is more familiar with Apache Velocity templates and SNAP module descriptors has the possibility to directly intervene in these artefacts, without going through the basic user GUI module.