Create workflow: NDVI

Jump to: navigation, search
Main Page Arrow.png Operations Arrow.png Create objects Arrow.png Create workflow Arrow.png
NDVI Condition Reange
NDVI example

In this example, a simple workflow (Figure 1) is constructed for calculation of a NDVI image from Landsat image band 4 (NIR) and band 3 (Red). The following equation is used:

NDVI = (NIR-Red) / (NIR+Red)

To construct the workflow, we used two connect boxes and three Binary math raster operation boxes. Each of connect box contains one image; as for this example, the box 5 contains NIR band and box 6 the Red band. Each of the Binary math operation box, execute the operation using one operator at the time. In case of this example, box 2 execute subtraction, box 3 execute the operation using add operator. As it is clear from Figure 3, the output of box 2 and 3 will form the first and the second input of the box 4 where the divide operator is used to generate the final output as the NDVI image.

Figure 1, a workflow to generate a NDVI image.

The following steps allows you to recreate and build this example:


  • From ILWIS main window, click Create tab
  • From the opened Object Creation form, select Workflow
  • Type a name for the workflow in the corresponding field of the opened workflow form
  • You may add Keywords and Description in their corresponding location in the form; it is optional
  • Click Create & Open button once you are ready with the form;

This will generate an empty workflow and open the workflow builder panel as illustrated in Figure 2.
To add the required input data and operations to the workflow panel:


  • From ILWIS main window, click Operation tab or operation catalog tab
  • From the operation list, drag the connect operation and drop it in the workflow editor (see Fig. 2)
  • Repeat the above action to add the second connector
  • From the operation list, drag the binarymathraster operation and drop it in the workflow editor
  • Add two more binarymathraster operation to the editor as it described above.

You may add metadata and customize the contents and title of each added box in the workflow editor.
Follow the steps bellow to do so:


  • Select one of the box in the workflow holder; e.g., first connect
  • Click Metadata tab from the Action panel tab
  • The opened Metadata form allows you the enter a name for the box title and a name for the input
  • Type a name in the field Labels e.g., NIR TM band
  • Type a name in the field Input parameter lables; e.g., NIR band
  • In the same way, you can add lables to all the box

In order to define the execution procedures you need to connect and define the input and output for each box.
To do so:


  • Select one of the boxes in the workflow editor and connect it to another box by an arrow

Note once the box is selected, 8 tiny handles (connectors) will appear around the selected box. You can use any of them to connect the box to another one by dragging an arrow form it using the mouse. By pointing the mouse pointer at one of the connectors, it color changes to red and an arrow will appear at the tip of the mouse pointer which can be dragged (extend) by moving the mouse. At the same time, the connectors around all the other boxes will be available and thus you are able to connect to any of them and specify the inputs parameters for that box. Note that each box (or operation) in workflow generate one output which can be used as an input parameter for another operation. Once the workflow is ready you need to save it using the save button; the first one on the button bar (see Fig 2). Now you can run the workflow directly, using the Run form which allows you to add the required input parameters by drag and drop action and to type a name and select a format for the output results. Once you are ready with the Run form:


  • Click the Run on the Action button bar to run the workflow in one go.
  • Click the Stop button to stop the workflow of being executed. Note, using the Stop button will completely stop the workflow.
  • Click the Run in step mode button to run the workflow one step at the time. The output result after each step will be displayed Step form and can be visualized by being double clicked.

Note, once the workflow is saved, it will be available in ILWIS operation list and therefore it can be executed as an operation.