Hexagon Geospatial
MENU

Spatial Modeler Tutorials

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
Showing results for 
Search instead for 
Do you mean 

Output Choice Example 2016

by Technical Evangelist on ‎09-29-2015 01:40 PM - edited on ‎06-08-2016 07:40 AM by Technical Evangelist (1,029 Views)

Download Model

 

Description: 

 

With ERDAS IMAGINE 2016 scheduled for launch at the HxGN Live conference in June, it's time to start showcasing some of the over a hundred new Operators available with this release. First up is the If Else operator used for flow control in a model. Please note that, because this is a new Operator for ERDAS IMAGINE 2016, the model cannot be opened in prior versions of ERDAS IMAGINE.

 

This model demonstrates how to enable the user to select which output(s) to generate out of an array of possible processing branches and outputs. In this example, the possible outputs are Simple Ratio, NDVI, and TNDVI. These are simple sub models, but used to demonstrate the concept of controlling which branch(es) to execute.

 

The If Else operator works by looking at the boolean value of a test on its first input port and then, based on the value of that port (true or false), executing the branch of the model connected to the second (true) port, or the third (false) port (which is hidden in the screenshot shown below since "false" means "do nothing" in this model).

 

In the provided model, the user is prompted to enter three output file names. (via Port Inputs). Each of those port inputs is connected to the Test port of an If Else operator. So, if the user provides an output filename, the stream is true when it enters the Test port and the branch of the model connected to the True port will be executed. If the user does not enter a filename then the test will return false and so the False port branch will be executed. In this case there is nothing attached to the False port of each If Else operator and so nothing is executed.  

 

Thus the user can provide one, two, or three output filenames to control which sub models get executed and information produced.

 

Please note that for these submodels, band 3 is assumed to be the Red wavelength, and band 4 is assumed to be the Near Infrared (NIR) wavelength. This model is only compatible with ERDAS IMAGINE 2016 (or later) because of the use of the If Else operator, introduced at version 2016.

 

 output_choice_example_v16-0-3.gmdx
 Output Choice.PNG

 

Input parameters:

 

Input Filename: Input an image which contains multispectral data where Band 3 is expected to be the Red wavelength information and Band 4 the NIR.

Simple Ratio Image: Name of the output single-band, floating-point image with values calculated using the Simple Ratio algorithm. If no filename is entered the Simple Ratio sub model will not be executed and no output will be created for this option.

NDVI Image: Name of the output single-band, floating-point image with values calculated using the NDVI algorithm. If no filename is entered the NDVI sub model will not be executed and no output will be created for this option.

Simple Ratio Image: Name of the output single-band, floating-point image with values calculated using the TNDVI algorithm. If no filename is entered the TNDVI sub model will not be executed and no output will be created for this option.

 

Output Choice_Dialog.PNG

 

Courses