The SNAP command line interfaces (CLIs) can be found in the bin folder of the Sentinel Toolbox installation. They are
- The Graph Processing Tool (GPT)
- A CLI for converting products and generating quicklooks (pconvert)
- A launcher for the SNAP Desktop
- A tool to configure the python interface
The Graph Processing Tool allows to use operators registered in the Graph Processing Framework. To be included in the Graph Processing Framework, operators must be registered on the base of Service Provider Interfaces. This concept is explained in Sub-Systems and their Extension Points. Using the GPT provides a convenient way to use operators in a headless environment or in batch mode.
An overview about the registered operators can be retrieved by adding the option -h . In a similar manner, detailed help about specific operators may be shown. To actually run an operator using the GPT, it is necessary to indicate the path to the source product(s), to the target product and to other operator-specific parameters which might be mandatory or specific.
As for complex operators the call from the command line can easily become confusing, it is also possible to pass the required settings in form of a xml-encoded graph file. It will then suffice to just pass the graph as parameter to the gpt.
An operator can be run multiple times with changed input (e.g., different source products) by using scripts. In a script, an operator is called multiple times with a graph. Using dedicated commands, source and target products as well as the operator-specific parameters can be exchanged.
SNAP Desktop may be launched from the command line using the snap - or snap64, if available - executable. When SNAP is started from the command line, it is possible to add several options. A selection of these is listed here:
- --help: Will show an overview about all available staring options
- --reload: Allows to install or re-install a module
- --install: Installs a set of given modules
- --disable: Disables a set of given modules
- --enable: Enables a set of given modules
- --update: Updates a set of given modules
- --open: Opens a SNAP session file or a number of EO data products
- --userdir: Changes the directory where user settings are stored
It is possible to add self-defined options.
snappy-conf will configure snappy with respect to an installed Python version. The created snappy package can then either be placed in your Python's directory or be added to the environment before working with Python. This step is required whenever you want to use SNAP with Python. The tool can be executed during the installation of the Sentinel Toolbox, so it only needs to be used when you want to use another Python installation.