Scripting with the Command Line Interface

The command line interface is useful to set up custom workflows and scripts.

You can choose between:

  1. SURE.exe - as the complete workflow in one executable (similar to the Graphical User Interface)
    e.g. sure.exe -o myorientation.prj -i C:\images -s AERIAL_NADIR 80 30

  2. Modules - each module component (e.g. True Ortho) as one executable

The second one is particularly useful when scripting custom modules combined with 3rd party software or repeated steps. For example, you can run the ModuleTrueOrtho with a custom list of input tiles instead of the full tile list dsm_extended_list.txt.

Call a  Module from any directory and with -h to retrieve the help text. Below is the one from ModuleTrueOrtho as an example:

You can also create a simple batch file (.bat file), which calls multiple commands subsequently as in the example:

Add executables to system PATH variable

During software installation, the SURE program folder can optionally be added to the system's path variable. By doing so you will be able to call all SURE executables, including SURE.exe, and the Module's executables, from every directory. This way you don't have to change directory to the SURE installation folder or specify the path of the complete executable.

Step-by-step guide

  1. Open a command line window - using the following options (Windows):

    1. Open a command window with Windowskey-R, typing cmd and executing

    2. Click in any directory into the white space (avoid files or folders), use Shift-Rightclick, and choose "Open Command Windows here" from the properties window

    3. Use a scripting environment or a .bat file to arrange multiple commands in an executable file

  2. Choose the desired module or executable

    1. SURE.exe - see documentation here

    2. Modules - see documentation here

  3. Call

    1. In the command window: add call and execute with Enter (can be paused with the "Pause" key on the keyboard)

    2. Create batch script

      1. Create a new text file in the desired folder

      2. Rename it from .txt to .bat

      3. Add one call per line

      4. Save the file and execute with double click

Further Reading