With each update to the IMAGINE Spatial Modeler we add more traditional remote sensing capabilities. There are, however, many tools that have not yet been integrated. Fortunately, you may be able to use some of these tools in your Spatial Model today by harnessing the power of the CommandLine operator. You can use this tool to pass simple data (file names, numbers and strings) to a command line program and then open the output file for further processing.
The above example demonstrates a simple Spatial Model that will apply a color table to two input images and then use MosaicPro to create a mosaic of these images. The final mosaic will then be displayed as a preview.
The steps to using a command line program in Spatial Modeler are as follows:
- Drag a CommandLine operator into your Spatial Model.
- Double click to open the operator and choose the exe for the command line tool you want to use.
- Add input ports for the input parameters you wish to set from Spatial Modeler inputs. In the example above, we added ports for the file names of the images to mosaic.
- Add an output port for the output file name.
- Create the argument string in the Arguments box by manually adding parameters or double clicking on items in the Ports list to add them at the current cursor location.
- The arguments in this example add the two input images (computing active area by corner using the first layer and a min and max background value of 0), name the output file and direct MosaicPro to use Geometry-based seam lines.
- Close the Command Operator dialog and connect the input and output ports.
You can find documentation for many IMAGINE command line tools by searching the Online Help. This documentation will help you to understand which parameters need to be passed in to the command line to generate your desired results.