S p a t i a l M o d e l e r
Copyright 1982 - 1999 by ERDAS, Inc. All rights reserved. Printed in the United States of America.
ERDAS Proprietary - Delivered under license agreement.
Copying and disclosure prohibited without express written permission from ERDAS, Inc. ERDAS, Inc.
2801 Buford Highway, N.E. Atlanta, Georgia 30329-2137 USA Phone: 404/248-9000
Fax: 404/248-9400
User Support: 404/248-9777
Warning
All information in this document, as well as the software to which it pertains, is proprietary material of ERDAS, Inc., and is subject to an ERDAS license and non-disclosure agreement. Neither the software nor the documentation may be reproduced in any manner without the prior written permission of ERDAS, Inc.
Specifications are subject to change without notice.
Trademarks
ERDAS is a trade name of ERDAS, Inc. ERDAS and ERDAS IMAGINE are registered trademarks of ERDAS, Inc. Model Maker, CellArray, ERDAS Field Guide, and ERDAS Tour Guides are trademarks of ERDAS, Inc. Other brands and product names are trademarks of their respective owners.
Spatial Modeler On-Line Manual
Introduction to Model Maker . . . 1
General Capabilities . . . 1
Starting Model Maker . . . 3
Model Maker Parts . . . 3
Objects . . . 6
Scalar . . . . 6
Table . . . . 6
Matrix. . . . 6
Normalized Matrix Object . . . . 6
Raster . . . . 7
Vector . . . . 7
Data Types . . . 7
Defining Objects in a Model . . . 7
Connections . . . . 8
Input Objects . . . . 8
Output Objects . . . . 9
Function Definitions . . . 10
Recoding Raster Objects . . . . 10
Using the Function Definition Dialog . . . 10
Input Objects . . . . 10 Functions . . . . 10 Prototype Arguments . . . . 11 Specifying Criteria . . . 12 Example . . . . 12 Output Parameters . . . 13 Working Window . . . 13 Cell Size . . . 13
Spatial Modeler On-Line Manual
Generating a Script . . . 15 Spatial Modeler . . . 16 Model Maker . . . 17 Running a Model . . . . 17 Modelmaker Tools . . . 22 Tools . . . 24 Graphical Models . . . 27 Save Model . . . 28 Page Setup . . . 29Set Cell Size . . . 30
Set Window . . . 31 Set Projection . . . 33 Generate Script . . . 34 Raster . . . 35 Recode . . . 38 Matrix Definition . . . 39 Table Definition . . . 43 Scalar . . . 48
Spatial Modeler On-Line Manual
Function Definition . . . 50 Criteria . . . 65 Text String . . . 67 Model Librarian . . . 68 Vector . . . 69Introduction to Model Maker
Introduction to Model Maker
A model is a set of instructions that is processed by the IMAGINE Spatial Modeler component for performing GIS and image processing operations.
The IMAGINE Model Maker is an editor for creating models using a palette of tools. These tools are used to place graphics representing input data, functions, criteria, and output data on a page to create a graphical model by drawing its flow chart.
The Spatial Modeler Language (SML) is a modeling language that is used by Model Maker to execute the operations specified in the graphical models that you create. You can also use the
Spatial Modeler Language directly to write your own script models that may be run from the
Model Librarian.
i
If a calibrated file is input to a model, output files created by the model will also be calibrated. If a subset of the area of the input file is output, the calibration is adjusted accordingly. If there are any other files input to the model, they must be the same size and have exactly the same calibration information as the first calibrated input file. You cannot input calibrated and geo-referenced files together.This documentation explains:
General Capabilities Starting Model Maker Defining Objects
Using Function Definitions Specifying Criteria
Output Parameters Creating a Model Running a Model
Using the Spatial Modeler Language
General Capabilities
Model Maker allows you to write both simple and complex models that incorporate GIS and image processing functions. These include:
Introduction to Model Maker
♦
convolution filtering,♦
neighborhood analyses (analyzing a pixel based on the values of neighboring pixels),♦
subsetting and mosaicking,♦
principal components analysis, and♦
contiguity analysis.The results of a model (an output file) can be written to a file, automatically opened in a Viewer window, or both.
Starting Model Maker
Starting Model Maker
You can access Model Maker by selecting the Model Maker option from theSpatial Modeler
dialog. To access this dialog, click this icon on theERDAS IMAGINE icon panel:
Model Maker Parts
The parts of the Model Maker window and palette of tools are explained in the following illustration:
Starting Model Maker Left-click to close this window to an icon. The toolbar consists of icons to provide rapid access to frequently used operations. Double-left-click a graphic that has been placed on the Model Maker page to bring up a
Once defined, each graphic has
a title under it. Left-hold anddrag any one of these corners to The title bar
shows the name of the model (including
directory). Left-hold theModel Maker
menu bar for
menus of operations to perform on the current model.
Use the scroll
bars to scroll the
data. The size of the bar shows how much of the data area you are viewing now.
Information about the button under the cursor is displayed in this
Starting Model Maker
Mostly, you will be working with:
♦
objects — (see below) the data upon which you operate or create, and♦
function definitions — the instructions that you compose on how the data are to be manipulated.These are explained below.
Objects
An object is an input to or an output from a function. The four basic object types used in Model Maker are described below.
Scalar
A scalar object is simply a single numeric value.
Table
A table object is a series of numeric values or character strings. A table has one column and a fixed number of rows. Tables are typically used to store columns from an attribute table, or a list of values which pertain to the individual layers of a rasterlayerset.
A table may consist of up to 32,767 rows. Information in the table can be attributes, calculated (e.g., histograms), or user-defined.
Matrix
A matrix object is a set of numbers arranged in a two dimensional array. A matrix has a fixed number of rows and columns. Matrices may be used to store convolution kernels or the
neighborhood definition used in neighborhood functions. They can also be used to store covariance matrices, eigenvector matrices, or matrices of linear combination coefficients.
➲
See the “Enhancement” chapter of theERDAS Field Guide for more information about convolution filtering.Starting Model Maker
1 1 1 1 1 1 1 1 1
...is used to average the pixels in an image. If these values were actually used, the output pixel values would be 9 times larger than expected.
The real matrix used to average the pixel values is: 1/9 1/9 1/9
1/9 1/9 1/9 1/9 1/9 1/9
For either custom or built-in input matrices, the default is to normalize the matrix which is usually desired for convolution filtering. If you are entering a matrix of coefficients for a function such as
LINEARCOMB, you may want to turn off the Normalize check box. For output matrices, normalization is turned off.
Raster
A raster object is a singlelayer orlayerset of raster data. Rasters are typically used to contain and manipulate data from image files.
Vector
A vector object is either an Arc/Info Coverage or an Annotation Layer.
Data Types
The objects above may be of the following data types:
♦
Binary - either 0 (false) or 1 (true)♦
Integer - integer values from -2,147,483,648 to 2,147,483,647 (signed 32-bit integer)♦
Float - floating point data (double precision)Table objects may also use the following data type:
♦
String - a character string.Defining Objects in a Model
In a model, objects are used as:
♦
input to afunction definition, to be operated upon, andStarting Model Maker
Connections
Whether an object is input or output is specified by how you connect each object to a function definition.
♦
By making a connection from an object to afunction definition, you specify that object as input to the function definition.♦
By making a connection from afunction definition to an object, you specify that object as output from the function definition.Of course, function definitions can be chained together in complex models, and therefore an object can be both input and output.
Objects (rasters, matrices, tables, and scalars) may be connected only to functions, and
functions may be connected only to objects. Connections which would form a circular path in the model are not allowed.
Model Maker will not let you connect a function to more than one output. If you try to draw a connector to a second output, the connector to the first output will disappear.
As you move object and function graphics in the Model Maker window, the connection arrows also move accordingly.
You can remove a connection by using the connector tool and simply drawing in the reverse direction (i.e., from function to object).
Input Objects
Follow these steps to define input objects in a model:
1. Decide upon which objects you need to operate to create one output. These will be your input
objects. Often, there will be only one or two input objects.
2. For each input object, select the appropriate object tool (Raster , Matrix , Table , or Scalar ) from theModel Tools palette, and place the object graphic in the Model Maker window. You can rearrange these graphics any time.
Starting Model Maker
5. Select the Connector tool from theModel Tools palette. Click on an input object graphic and drag the connector to the function graphic. Repeat for each input object.
Now your input objects are defined so that you can create a function definition with those objects.
Output Objects
Follow these steps to define an output object:
☞
There can be only one output object for each function definition. There can, however, be many function definitions in a model.1. If needed, use the Function tool in the Model Tools palette to place a function graphic in your model.
2. Select the appropriate object tool for your output (Raster , Matrix , Table , or Scalar ) from the Model Tools palette, and place the object graphic in the Model Maker window. The type of object that you select will depend upon the function definition.
3. Select the Connector tool in the Model Tools palette. Clock on the function graphic and drag the connector to the output object graphic.
Function Definitions
Function Definitions
Objects used in a Model Maker model are operated upon with function definitions that you write with the Model Maker. The function definition is an expression (like “a + b + c”) that defines your output. You will use a variety of mathematical, statistical, Boolean, neighborhood, and other
functions, plus the input objects that you set up, to write a function definition.
To create a function definition, follow these steps:
1. Define your input objects, following the steps above. You should have your input objects defined, and all connections made from the input objects to the function graphic.
2. Double-click on the function graphic. TheFunction Definition dialog is opened. Use this dialog to compose a function definition.
☞
You should define all input objects to a function before you double-click on the function graphic. Then, the inputs you specified will be listed in the Function Definition dialog. You can then select the input objects from a list in the dialog as you compose your function definition.Recoding Raster Objects
If the purpose of your model is to recode only, you can set up the recode in theRaster dialog and you do not need to select a function in theFunction dialog. Place the input raster graphic on the page, set up the recode when defining the raster and connect this graphic to the function graphic. Then connect the function graphic to an output raster graphic.
Within the function definition, you simply click on the input raster which will be recoded and copied to the output raster.
Using the Function Definition Dialog
Input Objects
The Available Inputs list in the dialog shows all of the inputobjects that are available for your function definition. These are the inputs that areconnected to the function as inputs. To change this list, change the objects that are connected to the function.
Function Definitions
When you click a function from the scrolling list, it is opened in the text field at the cursor location. The simplest function definition is a copy. A copy requires no functions. Just click on an available input object in the list, so that your function definition consists only of the input object name. When the model is executed, this will simply copy the selected input to the output object. This is useful when all you want to do to a raster is recode it.
Prototype Arguments
Many functions in the scrolling list have prototypes, which are short descriptions of the appropriate input objects or values upon which that function operates. Prototypes are surrounded by < > brackets. You must replace a prototype with an object or value.
After you place a function into the function definition text field, click in a function’s prototype to position the cursor within the brackets. Then click the desired input object, and it will
Specifying Criteria
Specifying Criteria
The Criteria function in Model Maker gives you the power of the CONDITIONAL function within theSpatial Modeler Language. You can use the Criteria function to build a table of conditions which must be satisfied to output a particular row value for a descriptor (or cell value) associated with the raster you select.
Double-click the criteria graphic in an existing model to define the criteria with theCriteria dialog. To establish a new Criteria function, click the icon on the Model Maker tool palette.
The inputs to a Criteria function are rasters. The columns of the Criteria table represent either descriptors associated with a raster layer, or the layer itself if the cell values are of direct interest. Criteria which must be met for each output column are entered in a cell in that column (e.g., >5). Multiple sets of criteria may be entered in multiple rows. The output raster will contain the first row number of a set of criteria that were met for a raster cell.
Example
The example below illustrates how you can use the Criteria function.
If descriptors of “Acreage” and “Class Name” are available and a map of pine forests larger than 10 acres is desired: both “Acreage” and “Class Name” are added as column titles in the Criteria dialog. In the cell under “Acreage,” “>10” is entered and under “Class Name,” “Pine” is entered. In this one row example, a pixel value of one is output for pixels that satisfy both criteria.
To take this example further, if more than one acreage class is desired, a row is added to the criteria table for each size class desired. Under “Acreage” in the first row “>50” might be entered and in the second row “>10.” The first row in which the criteria are satisfied will be the output pixel value, thus the relational expressions should be more restrictive as you go down the rows.
Output Parameters
Output Parameters
Since you can have several inputs in one model, you have the option to define the working window and the cell size of the output data.
Default settings for these parameters can be set in thePreference Editor.
Working Window
You can input raster layers of differing areas into one model. However, you must specify the image area (or working window) to use in the model calculation. Select one of three options:
♦
Union - the model will operate on the union of all input rasters.♦
Intersection - the model will use only the area of the rasters that is common to all input rasters.♦
Other - specify the working window in explicit coordinates.The default setting is union. To change this parameter, under Model on the Model Maker menu bar, click Set Window and theSet Window dialog is opened.
Cell Size
Input rasters may also be of differing resolutions (pixel size), so you must also select the output file cell size as either:
♦
Minimum - the minimum cell size of the input layers will be used. This is the default setting.♦
Maximum - the maximum cell size of the input layers will be used.♦
Other - specify a new cell size.To change the cell size, under Model on the Model Maker menu bar, click Set Cell Size. The
Creating a Model
Creating a Model
There are several graphical models included with ERDAS IMAGINE in the <$IMAGINE_HOME>/ etc/models directory. You can load these models to run them or edit them to create new models.
Creating a New Model
There are two basic ways to create a new model:
♦
edit an existing model, or♦
create a model from “scratch.”Edit an Existing Model
Open an existing model, either one that was delivered with IMAGINE, or one that you previously created. Select File | Open in theModel Maker menu bar and select the model to view. Double-click on any of the graphics in the model to redefine them. You can change the inputs used, select another function to use, etc.
Using the Spatial Modeler Language
Using the Spatial Modeler Language
The Spatial Modeler Language is a language designed for advanced modeling and includes over 200 functions and operators. Models can be created in a text file and run from a command line, or from within ERDAS IMAGINE.
TheSpatial Modeler Language encompasses all functions available in Model Maker as well as:
♦
conditional branching and looping♦
complex and color data types♦
more flexibility in using raster objects and descriptorsGraphical models created with Model Maker can be output to a script file (text only) in the Spatial Modeler Language. These scripts can then be edited with a text editor using the Modeler Language syntax and re-run or saved in a library.
Generating a Script
Models created with Model Maker can be saved as a script file (text only) by selecting Process
| Generate Script on the Model Maker menu bar.
You can access this script from the Model Librarian option of the Spatial Modeler. Through the
Model Librarian, you can Edit, Run, or Delete models.
The Edit option brings up a text editor where you can use the Modeler Language to write new or edit existing models.
Spatial Modeler
Spatial Modeler
Spatial Modeler enables you to create and run models for image processing and GIS analysis. It is a highly flexible tool which usesModel Maker and theSpatial Modeler Language.
The Spatial Modeler Language is a modeling language that is used internally by Model Maker to execute the operations specified in the graphical models that you create. You can also use the
Spatial Modeler Language directly to write your own script models.
Click this icon on theERDAS IMAGINE icon panel to access Spatial Modeler:
Model Maker...
Click to open theModel Maker window and the Model Maker Tool palette. This window allows you to work with graphical models. You can view or edit existing models and create new models.Script Librarian...
Click to open theModel Librarian dialog. This dialog lists all the existing script models in the system. Using this option, you can view, edit, create, and delete script models.Close
Click to close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.➲
See the on-lineSpatial Modeler Language manual for more information about creating script models.Model Maker
Model Maker
The Model Maker menu is displayed across the top of every Model Maker window. You can select each word on the menu bar to access a pull-down menu of options. This menu contains options for opening existing models, saving models, setting the cell size and operating window, formatting text, and running the model.
Click Model Maker in theSpatial Modeler dialog to access this menu.
Running a Model
Once you have created a graphical model, you can execute it by selecting Process | Run from the Model Maker menu bar or by clicking the run icon on the tool bar. These options will be disabled until all objects have been defined and each function and criteria is connected to an output.
Models can be run as soon as they are written, or they can be:
♦
saved and run later through Model Maker♦
edited and re-run immediately (or later)♦
converted to a script (text only) and run from theModel LibrarianFile
Click for options for creating new graphical models, opening existing models, saving models, and quitting Model Maker. The keyboard shortcut is Meta-f.New Click to bring up a new Model Maker page and create a new graphical model. The
keyboard shortcut is Ctl-n.
Open... Click to bring up theGraphical Models dialog for selecting an existing file to open. You will be alerted if changes to the current model have not been saved with the Not Saved dialog. The keyboard shortcut is Ctl-o.
Close Click to close the current graphical model and, if no other Model Maker windows
are open, quit Model Maker. You will be alerted if changes to the current model have not been saved with the Not Saved dialog. The keyboard shortcut is Ctl-c.
Save Click to save changes to the current graphical model. The keyboard shortcut is
Ctl-s.
Save As... Click to bring up theSave Model dialog to save the current model as a new file. This option also allows you to save the model as an annotation file (.ovr) or as an encapsulated PostScript file (.eps).
Model Maker
Page Setup... Click to use thePage Setup dialog in preparation for printing
Show Page Breaks Click to toggle the display of page breaks in the graphical model. Print... Click to print the current graphical model. ThePrint dialog is opened. The keyboard shortcut is Ctl-p.
Close All Close all Model Maker windows
Edit
These options let you delete or add selected graphics on the Model Maker page. The keyboard shortcut is Meta-e.Cut Click to cut the selected object(s) from the Model Maker page. The keyboard
shortcut is Ctl-x.
Copy Click to copy the selected object(s) to the paste buffer. The item(s) can be pasted
using the Paste command below. The keyboard shortcut is Ctl-c.
Paste Click to paste the contents of the paste buffer. Select this option only if you have
previously used the Copy command. The keyboard shortcut is Ctl-v.
Clear Click to delete the selected graphics from the Model Maker page. The keyboard
shortcut is the Delete key.
Select All Click to select all graphics in the model.
Invert Selection Click to deselect all objects that are selected and select all objects that
are not selected.
Properties... Click and theTable definition dialog for the selected object is opened.
Tools... Click to display theTool Palette.
Model
These options let you specify the cell size and operating window of the model. The keyboard shortcut is Meta-m.Set Cell Size... Click to set the cell size for the output layer(s) of the model. TheSet Cell Size dialog is opened.
Model Maker
Snap to Grid Click to turn on an invisible 1/10” grid that will make it easier to align model
objects and connection arrows.
Overview Click to fit the entire model in the current window. This is effective for viewing
large models. Use the zoom icon on the tool bar to return the model to its original size.
Optimize Click to optimize the model by making it a singleblock statement.
Text
Click to format selected text by choosing font, style, and size. The keyboard shortcut is Meta-t.Font Click to choose the font of the selected text from the list in the pull-down menu.
The available fonts are: Charter
Courier Helvetica
New Century Schoolbook Symbol
Times
Size Click to select the point size of the selected text from the list in the pull-down menu.
The available point sizes are: 8, 10, 12, 14, 18, 24.
Style Click to select the style of the text by selecting all applicable check boxes in the
pull-down menu. The options available are:
Normal Set Font Style to Normal. Selecting this option will reset bold, italics, and
underline.
Bold Set Font Style to Bold Italics Set Font Style to Italics
Underlined Set Font Style to Underlined
Process
Click to generate a script (text file) of the graphical model or execute the model. The keyboard shortcut is Meta-p.This option is not enabled until you have created or displayed a valid model (input, function, output - all defined).
Run Click to execute the displayed model.
Generate Script... Click to bring up theGenerate Scriptdialog in order the save the graphical model in text form for use in the Spatial Modeler Language. The keyboard shortcut is Ctl-g.
Model Maker
Help
Select from this menu the kind of help you need.Help For ModelMaker Select this option to open this On-Line Help document. Help For This Model Select this option (if enabled) to display help for the model
currently displayed in the Model Maker.
Imagine Version Select this option to view the version number of IMAGINE.
Click this icon to open an existing model file. TheGraphical Models dialog is opened.
Click to close the model.
Click to open a new Model Maker window.
Click to save a model.
Click to print the model. ThePrint dialog is opened.
Click to cut the selected object(s) from the model.
Click to copy the selected object(s) to the paste buffer.
Click to paste the buffer contents into the model. This option should be used only after using the Copy option.
Model Maker
NOTE: Since scalable fonts are not used, text is not able to be displayed while in overview mode and thus may not be edited.
Click to select this tool while in overview mode. Then click in the window to indicate a location about which to zoom. This resets the viewing scale to a zoom factor of one.
Modelmaker Tools
Modelmaker Tools
This small palette of tools and a blankModel Maker page are opened when you select Model
Maker from theSpatial Modeler menu. The palette is available whenever Model Maker is running.
i
The Large vs. the Small tool palette is selected by clicking Session | Preferences | viewer from theERDAS IMAGINE icon panel.These tools are used to place graphics on a Model Maker page to create amodel.
To place an item on the Model Maker page, click on the icon, then click on the Model Maker page where you want the graphic to appear. These graphics can be moved on the page by simply selecting them (click) and dragging (left-hold) to a new location
Use this tool to select items on the Model Maker page. Once selected, these graphics (or text) can be moved or deleted. Click and drag a selection box to select multiple elements. Multiple selected elements can be dragged to a new location as a unit.
You can also use the arrow to double-click on a graphic to further define its contents.
Create araster object.
Double-click the raster graphic to define the object with theRaster dialog.
Place avector object in the model.
Double-click the vector graphic to define the object with theVector dialog.
Create amatrix object.
Modelmaker Tools
Double-click the scalar graphic to define the object with theScalar dialog.
Create afunction definition.
Double-click the function graphic to define the function definition with theFunction Definition dialog.
Create acriteria function.
Double-click the criteria graphic to define the criteria with theCriteria dialog.
Use the connector tool toconnect objects and functions together.
With this tool selected, click and drag from one graphic to another to connect them in the order that they are to be processed in the model.
To delete a connection, simply click and drag in the opposite direction (from the output to the input).
Create descriptive text to make your model readable. TheText String dialog is opened.
Click to open this On-Line Help document.
Keep tool selected.
Revert back to selector tool after using a selected tool.
Close
Click to dismiss the tool palette.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Tools
Tools
This large palette of tools and a blankModel Maker page are opened when you click MODEL
MAKER in theSpatial Modeler menu. The palette is available whenever Model Maker is running.
i
The Large vs. the Small tool palette is opened by selecting Session | Preferences | viewer from theERDAS IMAGINE icon panel.These tools are used to place graphics on a Model Maker page to create amodel.
To place an item on the Model Maker page, click on the icon, then click on the Model Maker page where you want the graphic to be displayed. These graphics can be moved on the page by simply selecting them (click) and dragging to a new location.
Use this tool to select items on the Model Maker page. Once selected, these graphics (or text) can be moved or deleted. Click and drag a selection box to select multiple elements. Multiple selected elements can be dragged to a new location as a unit.
You can also use the arrow to double-click on a graphic to further define its contents.
Create a raster object.
Double-click the raster graphic to define the object with theRaster dialog.
Place a vector object in the model.
Tools
Double-click the table graphic to define the object with theTable Definition dialog.
Create a scalar object.
Double-click the scalar graphic to define the object with theScalar dialog.
Create a function definition.
Double-click the function graphic to define the function definition with theFunction Definition dialog.
Create a criteria function.
Double-click the criteria graphic to define the criteria with theCriteria dialog.
Use the connector tool to connect objects and functions together.
With this tool selected, click and drag from one graphic to another to connect them in the order that they are to be processed in the model.
To delete a connection, simply click and drag in the opposite direction (from the output to the input).
Create descriptive text to make your model readable. The Text String dialog is opened.
Keep Tool
Turn this check box on if you want to place an item more than once on the page.Close
Click to dismiss this tool palette.Tools
➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Graphical Models
Graphical Models
This dialog allows you to open an existing graphical model. Graphical models have the file name extension .gmd. You can edit this model with theModel Maker tools.
This dialog is opened when you select File | Open from the mainModel Makermenu bar or
when you click the icon on the tool bar.
File Name:
Enter the name of the graphical model to open or click on a desired model appearing in the scrolling list of files. The default file extension is .gmd.Cancel
Click to cancel this process and close this dialog.OK
Click to open the model and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Save Model
Save Model
This dialog allows you to save a new model or save an existing model under a new name or in a different format. Models can be saved as annotation files and as encapsulated PostScript files. This dialog is opened when you select File | Save As from the mainModel Makermenu bar.
As:
Click on the popup list button to specify the type of file to create.Graphical Model Click to save the current model as a graphical model. Enter a file name
for the new graphical model. Graphical models have the default file extension .gmd. Use thePreference Editor to set the default model directory for this option.
Annotation Click to save the current model as an annotation file. The default file
extension is .ovr.
EPS Click to save the current model as an encapsulated PostScript file. The default file
extension is .eps.
Cancel
Click to cancel this process and close this dialog.OK
Click to save the file and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Page Setup
Page Setup
This dialog lets you specify the page setup in preparation for printing the graphical model. It is opened when you select File | Page Setup from the mainModel Makermenu bar.
Page Size:
Enter the X and Y coordinates for the page size of your printer.X: Enter the size of the page in inches in the X direction. Y: Enter the size of the page in inches in the Y direction.
Page Margins:
This group lets you specify the Top, Bottom, Left, and Right margins in inches for the page.Page Orientation:
This group lets you specify the page orientation for the page.Click for portrait (vertical) page orientation.
Click for landscape (horizontal) page orientation.
Reduce or Enlarge
Enter the percentage to reduce or enlarge the model when printing. (Greater than 100% enlarges the size, less than 100% reduces the size.)Print Page Numbers
Click to print page numbers on a multiple page model.OK
Click to save the changes made to the page setup and close this dialog.Cancel
Click to close this dialog without making any changes.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Set Cell Size
Set Cell Size
If two or more input rasters are used, you can set thecell size of the output file to either the maximum or minimum of the inputs, or you can specify a new cell size. The default is the minimum of the input layers.
This dialog is opened when you select Model | Set Cell Size from the mainModel Makermenu bar.
Cell Size:
Click on the popup list button to specify the cell size of the output layer as one of the following.Minimum The cell size of the output layer will be the minimum cell size of all input layers.
If this option is selected, all other parameters are disabled.
Maximum The cell size of the output layer will be the maximum of the input layers. If this
option is selected, all other parameters are disabled.
Other The cell size of the output layer will be user-specified. If this option is selected,
you must enter the X and Y cell size below.
X:
Select the X cell size of the output layer. This option is disabled unless Other is selected under Cell Size.Y:
Select the Y cell size of the output layer. This option is disabled unless Other is selected under Cell Size.Units:
Click on the popup list button to select the units of the X and Y cell size. This option is disabled unless Other is selected under Cell Size.meters The cell size in the output layer will be measured in meters. feet The cell size in the output layers will be measured in feet.
OK
Click to set these parameters and close this dialog.Set Window
Set Window
This dialog enables you to set the operating window for the input raster layers as either union, intersection, or other. This dialog is opened when you select Model | Set Window from the
Model Maker menu bar.
Set Window To:
Click on the popup list button to select the window method to use.Union The model will run on the union of the input layers.
Intersection The model will run on the intersection of the input layers. Specify Specify an alternate operating window below.
Map
Click to use map coordinates, if the data are rectified.File
Click to use file coordinates, which are pixels, starting with 0,0 in the upper left corner.From Inquire Box
: Click to define a subset area of the data by using the ViewerInquire Box. When you click this button, the coordinates below are updated with the coordinates of the cursor box in the Viewer.To change these coordinates, you can move and/or resize the cursor box in the Viewer, then click this button again.
The image you are using and the inquire box must already be displayed in a Viewer in order to use the From Inquire Box option. Otherwise, you may manually enter coordinates in the fields below.
UL X:
Upper Left X coordinate.UL Y:
Upper Left Y coordinate.LR X:
Lower Right X coordinate.LR Y:
Lower Right Y coordinate.Cancel
Click to cancel this process and close this dialog.OK
Click to accept this operating window and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.Set Window
➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Set Projection
Set Projection
The Set Projection dialog is used to set the output projection of the model.
To open this dialog, click Modeler on the ERDAS IMAGINE main menu, and select Model
Maker.... This opens the New_Model dialog. Click Model | Set Projection... and the Set
Projection dialog opens.
Set output projection to either:
Same As The projection is the same as a selected input.
➲
This cannot be used unless the inputs are defined.none defined This indicates to the user that if you want to use Same As, the inputs
must be defined first.
From Library This selects a library and a projection within that library. Projection: Select projection from library.
For more information about projection libraries, see Projection Chooser.
OK
Click this button to accept the selection made.Cancel
Click this button to keep the projection unchanged.Generate Script
Generate Script
This dialog enables you to generate a script (text copy) of your graphical model for use with the
Spatial Modeler Language. This text copy can later be edited. Script models have the default file extension .mdl.
The dialog is opened when you select Process | Generate Script from the mainModel Maker
menu bar. The Process menu is disabled until all objects have been defined and each function and criteria are connected to outputs.
Script Name:
Enter a name for the script. The .mdl extension will be added automatically.OK
Click to generate the script and close this dialog.Cancel
Click to cancel this process and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Raster
Raster
This dialog enables you to define araster object inModel Maker.
This dialog is opened when you double-click a raster graphic that has been placed on theModel Maker page or when you select Edit | Properties from the Model Maker menu bar with a raster object selected.
File Name:
Use the file name part to enter the file to use or click on theFile Selectorbutton. The default file extension is .img.
Prompt User for File at Run Time
Click to select a file to use at the time the model is executed. Do not specify a file in the current dialog. A new dialog to specify a file is displayed when the model is executed.Delete If Exists
Click to delete a selected file if it exists when the model is executed. This option is displayed only when the raster is the output of a function.Input:
This group is enabled when you select an existing file. Basic information about the file is listed, and you have the option to change the interpolation method used, select the data type to use, and select an area of interest.Forcategorical (thematic) data, you also have the option to recode the data file values.
Number of Layers: Reports the number of layers in the selected image file. Number of Rows: Reports the number of rows in the selected image file.
Number of Columns: Reports the number of columns in the selected image file. Interpolation: Click on the popup list button to select the interpolation method used
whenresampling the data.
Nearest Neighbor Resample the data using Nearest Neighbor. Bilinear Resample the data using Bilinear Interpolation.
Cubic Convolution Resample the data using Cubic Convolution.
Processing Window: This group lets you select a subset of the input data to use for
processing.
Map Click to use map coordinates, if the data are rectified.
File Click to usefile coordinates, which are pixels, starting with 0,0 in the upper left corner.
Raster
From Inquire Box Click to define a subset area of the data by using the ViewerInquire Box. When you click this button, the coordinates below are updated with the coordinates of the cursor box in the Viewer.
To change these coordinates, you can move and/or resize the cursor box in the Viewer, then click this button again.
The image you are using and the inquire box must already be displayed in a Viewer in order to use the From Inquire Box option. Otherwise, you may manually enter coordinates in the fields below.
UL X: Upper Left X coordinate. UL Y: Upper Left X coordinate. LR X: Lower Right X coordinate. LR Y: Lower Right Y coordinate.
Declare as: Click on the popup list button to indicate the data type to use for the input
file. This setting overrides the actual data type of the input file.
For example, if the input file is integer and you want to perform floating point calculations in the model, simply declare the input as Float here.
Binary Click to set the input file to binary format. Integer Click to set the input file to integer format. Float Click to set the input file to floating point format.
Area of Interest: This group lets you select an area of interest to use for processing. Choose AOI... Click to select an AOI (area of interest) in the image to which to apply
this function. TheChoose AOI dialog is opened.
Recode Data Click to recode the values in the input file. The recode options are
Raster
File Type: Click on the popup list button to selectthematic orcontinuous as the output file type.
Ignore <value> in Stats Calculation When this check box is on, pixels with the
specified file value will be ignored when statistics are calculated for the output file.
Temporary Raster Only
If you are defining an output image file that is just an intermediate result and you do not want to save it to a permanent file, click this check box.(Temporary Raster Popup List) Click on the popup list button to indicate the data type to
use for the temporary file.
Binary
Click to create the temporary file in binary format.Integer
Click to create the temporary file in integer format.Float
Click to create the temporary file in floating point format.Cancel
Click to cancel this process and close this dialog.OK
Click to accept these parameters and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Recode
Recode
This dialog is opened when you select Setup Recode... from theRaster or theVector dialogs in Model Maker. The CellArray allows you torecode the classes of an input raster or the attributes of an input vector. The recoded values are then used in thefunction definition.
(CellArray)
All available attributes of the selected raster or vector are displayed in this CellArray. The output values of the recode are entered in the New Value column.New Value:
Enter the new class value to assign to rows that are selected in the CellArray.Change Selected Rows
Click to apply changes to the table.OK
Click to accept these data values and close this dialog.Cancel
Click to cancel this process and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Matrix Definition
Matrix Definition
This dialog enables you to define amatrix object inModel Maker. Once a matrix has been defined for a particular model, it is saved with that model.
This dialog is opened when you double-click a matrix graphic that has been placed on the Model Maker page or when you select Edit | Properties from the Model Maker menu bar with a matrix selected. Actually two dialogs will be opened; one for the Matrix Definition options, and one containing aCellArray that lets you set up the Matrix.
Select:
Select the type of matrix to use. The options that are displayed in this dialog will depend on which of these is selected.Built_In Click to use a built-in matrix. Select the matrix from the Built In popup list,
below.
Custom_Matrix Click to define a custom matrix using the CellArray. This custom matrix
can be based on a built-in matrix by selecting Built-In first, and then editing the values in the CellArray manually.
Read Click to read in an existing matrix.
Output Click to have an output matrix created by the model. All options will be disabled
because the model will generate a matrix of the size appropriate for the function being performed.
The following options displayed if you click the Built_In option above.
Built In:
Select one of the pre-defined matrices to use.Kernel: Click on the popup list button to select a matrix from a list of commonly used
convolution kernels: Edge_Detect Edge_Enhance Low_Pass High_Pass Horizontal Vertical Sobel_1 Sobel_2
Matrix Definition
Summary
Size: Click on the popup list button to select a size for the built-in matrix: 3x3, 5x5 or 7x7.
The following options are displayed if you click the Custom_Matrix option above.
Create Custom:
Use this group to specify parameters for a custom matrix. These options are enabled when you select Custom_Matrix.Type: Click on the popup list button to select thedata type for the matrix.
Binary Integer Float
Size: Define the size of your custom matrix. The maximum size is 512 x 512.
Shape Definition:
This group of options is enabled when you select Shape, below. It allows you to define a circular, rectangular, or doughnut-shaped kernel within the matrix. (Other values are usually zero.)Within Shape: Click on the popup list button to choose the shape of the kernel within
the matrix.
Circular The kernel will be circular.
Rectangular The kernel will be rectangular.
Within Radius: Specify the number of cells from the center of the matrix to extend the
circle.
width: Specify the width (X dimension) of the inner kernel, measured from the center
cell.
height: Specify the height (Y dimension) of the inner kernel, measured from the
Matrix Definition
This value must be less than the value entered in Within Radius.
width: Specify the width (X dimension) of the inner shape, measured from the center
cell.
height: Specify the height (Y dimension) of the inner shape, measured from the
center cell.
Apply
Click to apply a new value to the selected cells or the defined shape of the matrix.Value:
Enter the value to assign to the selected cells or the defined shape of the matrix.After specifying the Within Radius and/or Beyond Radius, you must enter a value and click
Apply to change the shape of the kernel and apply the correct values.
to: Indicate whether the selected value entered should be applied to a shape or a
selection.
Shape Values in the table, based on the shape specified in the Shape Selection
The following options are displayed if you click the Read option above.
Read Matrix From:
If you select Read, above, you must enter the name of the matrix to read or click on theFile Selector button. The default file extension is .mtx.Prompt for File at Run Time Click to specify the file to read from at the time the model
is executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
The following options are displayed if you click the Output option above.
Output Options:
If you are creating an Output matrix, you can select whether or not to write the matrix to a file.Write To File: Click to write the output matrix to a file. When this option is selected, the
file name part is enabled and you can enter a name for the file or click on theFile Selector
button. The .mtx extension will be added automatically. This ASCII file can then be used as input in other models or imported into other software packages for statistical or other analysis.
Prompt for File at Run Time Click to specify the file to write to at the time the model is
executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
Show Matrix in Session Log Click to write the output matrix to the Session Log when
Matrix Definition
Normalize Matrix During Execution
Click tonormalize the matrix. This option is disabled if you are creating an output matrix.Cancel
Click to close this dialog without making any changes.OK
Click to accept these parameters and close this dialog.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides for step-by-step instructions on using Model Maker.➲
For more information about using kernels (matrices) for convolution filtering operations, see the “Enhancement” chapter in theERDAS Field Guide.Table Definition
Table Definition
This dialog enables you to define atable object inModel Maker.
This dialog is opened when you double-click atable graphic that has been placed on aModel Maker page or when you select Edit | Properties from the Model Maker menu bar with a table object selected.
Select:
Indicate the type of table you are defining.Descriptor An input table consisting of a selected descriptor of a layer (or the histogram
if acontinuous layer is selected), or an attribute of an Arc/Info Coverage, or an
Annotation Layer. Descriptor tables may be input objects only. They cannot be the output of a function definition. The Descriptor Source options are displayed.
Custom Click to explicitly define an input table. The Create Custom options are
displayed.
Read Click to input a table from an existing file. The Read Table From section is
displayed allowing you to select a file name.
Output Click to create an output table with the model. This option should be used any
time a connection is made from a function to a table. You have the option to write the output table to a file, session log, or a descriptor on attribute in the Output Options section. The following options are displayed if you click the Descriptor option above.
Descriptor Source:
Click on the popup list button to select the source of the descriptor table. The source can be either a raster or a vector layer.Use the file name part to select the file to use or click on theFile Selector button.The default file extension for a raster layer is .img, .ovr for an annotation layer, and .arcinfo for an Arc/Info coverage.
Raster Layer
Layer: This option is displayed if a Raster Layer is selected as the descriptor source.
Click on the popup list button to select the layer to use.
Attribute: Click on the popup list button to select an attribute to display in the table.
Arc/Info Coverage
Feature Type: This option is displayed when an Arc/Info Coverage is selected as the
Table Definition
LINE Select this feature type to select line attributes. POINT Select this feature type to select point attributes.
Attribute: Click on the popup list button to select an attribute to display in the table.
Annotation Layer
Attribute: Click on the popup list button to select an attribute to display in the table. Prompt for File at Run Time Click to select a file to use at the time the model is
executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
The following options are displayed if you click the Custom option above.
Create Custom:
These options are displayed if you are creating a custom table. The size and data type for the table are defined below.New Value: If the Data Type selected is Integer or Binary, then this option is displayed.
Enter the value to use for the selected rows in the column(s).
New String: If the Data Type selected is String, then this option is displayed. Type in the
string to use.
Start Color: If the Data Type selected is Color, then this option is displayed. Click on the
color selector to choose the color for the first slice
End Color: If the Data Type selected is Color, then this option is displayed. Click on the
color selector to choose the color for the last slice
By:
IHS Colors assigned to rows are derived using the Intensity, Hue, Saturation (IHS) color scheme. The default Start and End colors produce a standard ROYGBIV level slice from magenta to red.
RGB Colors assigned to rows are derived using the Red, Green, Blue (RGB) color scheme. The default Start and End colors produce a gray scale from black to white.
Table Definition
Data Type:
Select thedata type for the table.Binary The data type will be binary. Integer The data type will be integer. Float The data type will be floating point. String The data type will be string. Color The data type will be color.
The following option is displayed if you click the Read option above.
Read Table From:
Enter the name of the table file to read. The default file extension is .tbl.Prompt for File at Run Time Click to specify the file to read from at the time the model
is executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
Data Type:
Select thedata type for the table.Binary The data type will be binary. Integer The data type will be integer. Float The data type will be floating point. String The data type will be string.
The following options are displayed if you click the Output option above.
Output Options:
When creating an output table, you can opt to write the table to a file.Write To: Click to write the table to a file. The file name part is enabled, allowing you to
enter an output file name or click on theFile Selector button. The default extension is .tbl.
Prompt Click to specify the file to write to at the time the model is executed. Do not
specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
Show Table in Session Log Click to output the table to the Session Log when the model
is run.
Output to Descriptor or Attribute Click to output the table to a descriptor or an attribute.
Table Definition
Output to a:
New Raster Click to output the table to a new descriptor or raster attribute Select:
New Raster: Select a new raster which is being generated by the model. Attribute: Click on the popup list button to select or create an attribute to write the
table to.
Existing Layer Click output the table to an attribute or descriptor of an existing layer. Existing Layer Type: Click on the popup list button to select the layer type that
contains the attribute or descriptor to write the table to.
Raster Layer
File: Enter a file name or click on theFile Selector button to select a file containing the layer and attribute to output the table to. The default extension is .img
Prompt Click to select a file at the time the model is executed. Do not specify a
file in the current dialog. A new dialog to select a file is displayed when the model is executed.
Layer: Click on the popup list button to select a layer to use
Attribute: Click on the popup list button to select or create an attribute to output
the table to.
Arc/Info Coverage
File: Enter a file name or click on theFile Selector button to select a file
containing the coverage and descriptor to output the table to. The default extension is .arcinfo
Table Definition
POINT Select this feature to enable point attributes.
Attribute: Click on the popup list button to select or create an attribute to write
the table to.
Annotation Layer
File: Enter a file name or click on theFile Selector button to select a file containing the layer and attribute to output the table to. The default extension is .ovr.
Prompt Click to select a file to use at the time the model is executed. Do not
specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.
Attribute: Click on the popup list button to select an attribute to write the output to.
Data Type:
Select thedata type for the table.Binary The data type will be binary. Integer The data type will be integer. Float The data type will be floating point. String The data type will be string.
OK
Click to accept these parameters and close this dialog.Cancel
Click to close this dialog without making any changes.Help
Click to open this On-Line Help document.➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Scalar
Scalar
This dialog enables you to define ascalar object inModel Maker. You have the option to read the scalar from a file and/or write the scalar to a file when the model is run.
This dialog is opened when you double-click a scalar graphic that has been placed on theModel Maker page or when you select Edit | Properties from the Model Maker menu bar with a scalar object selected.
Value:
Enter the value of the scalar.Type:
Click on the popup list button to select thedata type for the scalar.Binary The scalar will be in binary format. Integer The scalar will be in integer format. Float The scalar will be in floating point format.
Read From:
Click to read the scalar to use from a file. This option is helpful, for example, if you are inputting a scalar that was used or created in another model.Enter the file name in the text field or click on theFile Selector button. The default file name is number.sca.
Prompt
Click to specify the file to read from at the time the model is executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.Write To:
Click to write the scalar to a file when the model is run. Enter the file name in the text field or click on theFile Selector button. The default file name is number.sca.Prompt
Click to specify the file to write to at the time the model is executed. Do not specify a file in the current dialog. A new dialog to select a file is displayed when the model is executed.Scalar
➲
For information on using the ERDAS IMAGINE graphical interface, see the on-lineIMAGINE Interface manual.➲
See theERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model Maker.Function Definition
Function Definition
This dialog lets you compose afunction definition using the appropriate input objects and available Spatial Modeler functions. The result is an expression that will define your output. This dialog is opened when you double-click afunction graphic that has been placed on the
Model Maker page or when you select Edit | Properties from the Model Maker menu bar with a function graphic selected.
Available Inputs:
Allobjects that areconnected as inputs to this function will be listed. Each layer of any raster layersets will be listed separately, as well as the name of the entire layerset.Click on any input in this list to add it to the function definition that is opened at the bottom of the dialog.
If <none defined> is opened, then no inputs have been defined for this function definition.
(calculator)
Click numeric values and operators as needed in the function definition. Items selected will be inserted in the function definition area at the bottom of the dialog.Functions:
Click on the popup list button to select a function category. The functions in that category will then appear in the scrolling list. Select a function from the scrolling list, and it will appear in the function definition, below.Anyprototype arguments that are needed for the selected function appear in < > brackets. Be sure to replace these with input objects or values.
Each function is described briefly below. These functions are described in detail in the On-LineSpatial Modeler Language Manual.
Analysis
Includes convolution filtering, histogram matching, contrast stretch, principal components, and more.CLUMP Clump - Contiguity Analysis: performs a contiguity analysis on<raster>, a single layerRASTER.