Escolar Documentos
Profissional Documentos
Cultura Documentos
O N - L I N E M A N U A L
Copyright 1982 - 1999 by ERDAS, Inc. All rights reserved.
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.
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
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
Creating a Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Creating a New Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Edit an Existing Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
iii
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Set Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Set Projection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Generate Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Raster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Recode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Matrix Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
iv
Spatial Modeler On-Line Manual
Function Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Text String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Model Librarian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
v
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.
General Capabilities
Defining Objects
Specifying Criteria
Output Parameters
Creating a Model
Running a Model
General Capabilities
Model Maker allows you to write both simple and complex models that incorporate GIS and
image processing functions. These include:
1
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.
Internal checks within Model Maker help you create valid models from the beginning.
2
Starting Model Maker
3
Starting Model Maker
4
Starting Model Maker
Modelmaker Dialog
Double-left-click
a graphic that has Information about Once defined,
been placed on the button under each graphic has Left-hold and
the Model Maker the cursor is a title under it.
page to bring up a displayed in this drag any one of
dialog box where window. Children these corners to
you specify of this process resize the
5
Starting Model Maker
♦ 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.
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
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 raster layerset.
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 the ERDAS Field Guide for more information about
convolution filtering.
You have the option to normalize the matrix in the Matrix dialog. Normalizing the matrix replaces
the cell values of the matrix with the values divided by the sum of all values of the matrix except
when the sum is zero.
6
Starting Model Maker
111
111
111
...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.
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 single layer or layerset of raster data. Rasters are typically used to contain
and manipulate data from image files.
Vector
Data Types
The objects above may be of the following data types:
7
Starting 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 a function definition, you specify that object as
input to the function definition.
♦ By making a connection from a function 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
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 the Model Tools palette, and place the object graphic in the Model
Maker window. You can rearrange these graphics any time.
3. Double-click on each object graphic in the Model Maker window to open the appropriate
dialog for defining that object. The Raster, Matrix, Table, or Scalar dialog is opened.
4. Use the Function tool from the Model Tools palette to place a function graphic in your
model. Position your graphics so that a line can be drawn from each input object graphic to
the function graphic.
8
Starting Model Maker
5. Select the Connector tool from the Model 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
☞ 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.
9
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.
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. The Function 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.
If the purpose of your model is to recode only, you can set up the recode in the Raster dialog
and you do not need to select a function in the Function 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.
The Available Inputs list in the dialog shows all of the input objects that are available for your
function definition. These are the inputs that are connected to the function as inputs. To change
this list, change the objects that are connected to the function.
To use an input object in your function definition, click on the object name in this list. It will be
displayed in the text field at the cursor location.
Functions
Using the popup list and the scrolling list of functions, you can select functions according to
function categories. The function categories and the functions in each category are
documented in the Spatial Modeler Language on-line manual.
10
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
automatically replace the prototype.
11
Specifying Criteria
Specifying Criteria
The Criteria function in Model Maker gives you the power of the CONDITIONAL function within
the Spatial 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 the Criteria 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.
12
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 the Preference 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 the Set 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
Set Cell Size dialog is opened.
13
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.
Then, select File | Save As from the Model Maker menu bar. Enter a new name for your model.
14
Using the Spatial Modeler Language
The Spatial Modeler Language encompasses all functions available in Model Maker as well as:
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.
15
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 uses Model Maker and the Spatial 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 the ERDAS IMAGINE icon panel to access Spatial Modeler:
Model Maker... Click to open the Model 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 the Model 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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
➲ See the on-line Spatial Modeler Language manual for more information about creating
script models.
16
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 the Spatial 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:
File 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 the Graphical 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 the Save 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).
Revert to Saved Click to redisplay the last saved version of the current graphical model.
17
Model Maker
Page Setup... Click to use the Page 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. The Print dialog is opened. The
keyboard shortcut is Ctl-p.
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.
Invert Selection Click to deselect all objects that are selected and select all objects that
are not selected.
Properties... Click and the Table definition dialog for the selected object is opened.
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. The Set Cell
Size dialog is opened.
Set Window... Click to select whether the operating window will be the intersection,
union, or other combination of the input rasters. The Set Window dialog is opened.
Set Projection ... Click to set the output projection of the model. The Set Projection
dialog opens.
Area of Interest... Click to select the area of interest (AOI) for the model. The Choose
AOI dialog is opened.
18
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.
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.
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).
Generate Script... Click to bring up the Generate Script dialog in order the save the
graphical model in text form for use in the Spatial Modeler Language. The keyboard
shortcut is Ctl-g.
19
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. The Graphical Models dialog is opened.
Click to paste the buffer contents into the model. This option should be used only after
using the Copy option.
Click to run the model. This icon is displayed only when the model is ready for
execution.
Click to fit the entire model in the current window. This is useful for viewing an overview
of a large model. Objects may still be selected and rearranged while in overview mode.
20
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.
21
Modelmaker Tools
Modelmaker Tools
This small palette of tools and a blank Model Maker page are opened when you select Model
Maker from the Spatial 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 the ERDAS IMAGINE icon panel.
These tools are used to place graphics on a Model Maker page to create a model.
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.
Double-click the raster graphic to define the object with the Raster dialog.
Double-click the vector graphic to define the object with the Vector dialog.
Double-click the table graphic to define the object with the Matrix Definition dialog.
Double-click the table graphic to define the object with the Table dialog.
22
Modelmaker Tools
Double-click the scalar graphic to define the object with the Scalar dialog.
Double-click the function graphic to define the function definition with the Function
Definition dialog.
Double-click the criteria graphic to define the criteria with the Criteria dialog.
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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
23
Tools
Tools
This large palette of tools and a blank Model Maker page are opened when you click MODEL
MAKER in the Spatial 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 the ERDAS IMAGINE icon panel.
These tools are used to place graphics on a Model Maker page to create a model.
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.
Double-click the raster graphic to define the object with the Raster dialog.
Double-click the vector graphic to define the object with the Vector dialog.
Double-click the matrix graphic to define the object with the Matrix dialog.
24
Tools
Double-click the table graphic to define the object with the Table Definition dialog.
Double-click the scalar graphic to define the object with the Scalar dialog.
Double-click the function graphic to define the function definition with the Function
Definition dialog.
Double-click the criteria graphic to define the criteria with the Criteria dialog.
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.
25
Tools
➲ For information on using the ERDAS IMAGINE graphical interface, see the on-line IMAGINE
Interface manual.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
26
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 the Model Maker tools.
This dialog is opened when you select File | Open from the main Model Maker menu bar or
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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
27
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 main Model Maker menu 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
the Preference 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.
➲ For information on using the ERDAS IMAGINE graphical interface, see the on-line IMAGINE
Interface manual.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
28
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 main Model Maker menu 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.
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.
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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
29
Set Cell Size
This dialog is opened when you select Model | Set Cell Size from the main Model Maker menu
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.
➲ For information on using the ERDAS IMAGINE graphical interface, see the on-line IMAGINE
Interface manual.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
30
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.
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 Viewer Inquire
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.
31
Set Window
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
32
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.
From Library This selects a library and a projection within that library.
33
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 main Model 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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
34
Raster
Raster
This dialog enables you to define a raster object in Model Maker.
This dialog is opened when you double-click a raster graphic that has been placed on the Model
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 the File Selector
button. 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.
For categorical (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
when resampling the data.
Processing Window: This group lets you select a subset of the input data to use for
processing.
File Click to use file coordinates, which are pixels, starting with 0,0 in the upper left
corner.
35
Raster
From Inquire Box Click to define a subset area of the data by using the Viewer Inquire
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.
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.
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. The Choose AOI dialog is opened.
Recode Data Click to recode the values in the input file. The recode options are
available for categorical data only.
Don’t Recode Data Click if you do not want to recode the data.
Setup Recode... Click to recode the values in the input file. The Recode dialog is
opened.
Output: This group of options is enabled if you are creating a new file.
Data Type: Click on the popup list button to select the output file data type.
36
Raster
File Type: Click on the popup list button to select thematic or continuous 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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
37
Recode
Recode
This dialog is opened when you select Setup Recode... from the Raster or the Vector dialogs
in Model Maker. The CellArray allows you to recode the classes of an input raster or the
attributes of an input vector. The recoded values are then used in the function 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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
38
Matrix Definition
Matrix Definition
This dialog enables you to define a matrix object in Model 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 a CellArray 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.
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.
Edge_Detect
Edge_Enhance
Low_Pass
High_Pass
Horizontal
Vertical
Sobel_1
Sobel_2
39
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 the data 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.
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
center cell.
Circular The beyond shape (inner section of the kernel) will be circular.
Rectangular The beyond shape (inner section of the kernel) will be rectangular.
Beyond Radius: Enter the number of pixels from the center to extend the inner circle.
40
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 the File 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 the File 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
the model is run.
41
Matrix Definition
Normalize Matrix During Execution Click to normalize the matrix. This option is
disabled if you are creating an output matrix.
➲ See the ERDAS 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 the ERDAS Field Guide.
42
Table Definition
Table Definition
This dialog enables you to define a table object in Model Maker.
This dialog is opened when you double-click a table graphic that has been placed on a Model
Maker page or when you select Edit | Properties from the Model Maker menu bar with a table
object selected.
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 the File 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
descriptor source. Click on the popup list button to select the feature type to use.
43
Table Definition
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.
Change Selection Click to assign the New Value or New String to the selected rows of
the table.
Size: Specify the number of rows in the table. This option is disabled for all options except
Custom.
44
Table Definition
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.
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 the File 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.
45
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 the File 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.
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 the File Selector button to select a file
containing the coverage and descriptor to output the table to. The default extension
is .arcinfo
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.
Feature Type: Click on the popup list button to select the feature type to use.
46
Table Definition
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 the File 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.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
47
Scalar
Scalar
This dialog enables you to define a scalar object in Model 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 the Model
Maker page or when you select Edit | Properties from the Model Maker menu bar with a scalar
object selected.
Type: Click on the popup list button to select the data type for the scalar.
Binary The scalar will be in binary format.
Integer The scalar will be in integer 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 the File 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 the File 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.
Show Scalar in Session Log Click to output the scalar to the Session Log when the
model is run.
48
Scalar
➲ For information on using the ERDAS IMAGINE graphical interface, see the on-line IMAGINE
Interface manual.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
49
Function Definition
Function Definition
This dialog lets you compose a function 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 a function 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: All objects that are connected 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.
Any prototype 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-
Line Spatial Modeler Language Manual.
50
Function Definition
DELROWS Delete Rows from Sieved Descriptor Column: outputs a table where the
rows corresponding to the “sieved” values have been deleted.
DIRECT LOOKUP Map Integer Values Through Lookup Table: maps integer values
in <arg1> through the lookup table <table>.
HISTMATCH Histogram Matching: determines a lookup table that will convert the
histogram of one object to resemble the histogram of another object.
LOOKUP Map Input Values Through Lookup Table Using Bin Function: if <table>
has an associated bin function, the values in <arg1> will be converted to bin numbers,
then the bin number will be used as an index into the lookup table <table>.
SIEVETABLE Get Sieve Lookup Table: produces a lookup table which can be used
to filter out small clumps from a layer which is the output of CLUMP.
STRETCH Stretch: performs a linear scale and shift on the input <raster>.
51
Function Definition
&& (Logical And): true if <arg1> and <arg2> are both non-zero, false otherwise.
HUE Get Hue from RGB: computes hue from red, green, and blue values.
IHSTOBLU Get Blue from Intensity, Hue, and Saturation: computes blue from
intensity, hue, and saturation values.
IHSTOGRN Get Green from Intensity, Hue, and Saturation: computes green from
intensity, hue, and saturation values.
IHSTORED Get Red from Intensity, Hue, and Saturation: computes red from
intensity, hue, and saturation values.
52
Function Definition
IHSTORGB Get Red, Green, and Blue from Intensity, Hue, and Saturation: computes
red, green, and blue from intensity, hue, and saturation values contained in <ihs>.
INTENS Get Intensity from RGB: computes intensity from red, green, and blue
values.
RGBTOIHS Get Intensity, Hue, and Saturation from Red, Green, and Blue: computes
intensity, hue, and saturation from red, green, and blue values contained in <rgb>.
SATUR Get Saturation from RGB: computes saturation from red, green, and blue
values.
STACK Convert FLOAT TABLE to COLOR TABLE: converts the RGB values from a
float table to a color scalar.
INDEX Index - Find Matching Item on List: if <test> equals <arg1>, 1 is returned.
If <test> equals <arg2>, 2 is returned, etc. If <test> is not equal to any of the
arguments on the right, 0 is returned.
PICK Pick - Get nth Item on List: if <number> is 1, <arg1> is returned. If <number>
is 2, <arg2> is returned, etc.
Data Generation Create raster layers from map coordinates, column numbers, or
row numbers. Create a matrix or table from a list of scalars.
MAPX Create Raster Containing X Map Coordinates: returns a raster in which each
pixel contains the x map coordinate corresponding to its position.
MAPY Create Raster Containing Y Map Coordinates: returns a raster in which each
pixel contains the y map coordinate corresponding to its position.
MATRIX Create Matrix from List of Scalars: returns a matrix <rows> rows by
<columns> columns containing the scalar arguments in the order listed across
successive rows.
53
Function Definition
MATRIX Read Matrix from Kernel Library: returns a matrix read from a kernel library.
MATRIX SERIES Create Matrix Containing 2-D Series: returns a matrix having
<rows> rows and <columns> columns.
PIXELX Create Raster Containing Column Number: returns a raster in which each
pixel contains its column position in the Working Window.
PIXELY Create Raster Containing Row Number: returns a raster in which each pixel
contains its row position in the Working Window.
STACKLAYERS Stack Raster Layers: outputs RASTER which includes all the layers
from <arg1>, <arg2>, <arg3>, etc.
TABLE Create Table from List of Scalars: creates a table containing the scalar
arguments input in the order listed.
. (Map Raster Through Descriptor Column): maps the single layer RASTER
<raster> through the descriptor column <name> from the descriptor table for the file
layer associated with <raster>.
54
Function Definition
LOG10 Common Logarithm: computes the common logarithm (base 10) of <arg1>.
BOUNDARY Boundary: returns 0 (FALSE) if all pixels in the focal window <focus>
have the same value. Returns 1 (TRUE) if there is more than one value in the focal
window.
FOCAL DENSITY Focal Density: returns the number of occurrences of the center
pixel value in the focal window <focus> around each pixel of <raster>.
FOCAL DIVERSITY Focal Diversity: returns the number of different values in the
focal window <focus> around each pixel of <raster>.
FOCAL MAJORITY Focal Majority: returns the most commonly occurring value in
the focal window <focus> around pixel of <raster>.
FOCAL MAX Focal Maximum: returns the maximum of the data file values in the
focal window <focus> around each pixel of <raster>.
FOCAL MEAN Focal Mean: returns the mean of the pixels in focal window <focus>
around each pixel of <raster>.
FOCAL MEDIAN Focal Median: returns the median of the values in the focal window
<focus> around each pixel of <raster>.
FOCAL MIN Focal Minimum: returns the minimum of the values in focal window
<focus> around each pixel of <raster>.
FOCAL MINORITY Focal Minority: returns the least commonly occurring value in the
focal window <focus> around each pixel of <raster>.
55
Function Definition
FOCAL RANK Focal Rank: returns the number of pixels in the focal window
<focus> whose value is less than the center pixel for each pixel of <raster>.
FOCAL SD Focal Standard Deviation: returns the standard deviation of the pixels in
the focal window <focus> around each pixel of <raster>.
FOCAL SUM Focal Sum: returns the sum of the pixels in the focal window <focus>
around each pixel of <raster>.
Focal Use Opts These functions are used with the Focal operations above and can
be inserted into these functions in place of the <use_option> argument.
The On-Line Help for these functions is included with the Help for the Focal functions.
Focal Apply Opts These functions are used with the Focal operations above and
can be inserted into these functions in place of the <apply_option> argument.
The On-Line Help for these functions is included with the Help for the Focal functions.
56
Function Definition
GLOBAL MAX Global Maximum: computes the maximum value of each layer of
<arg1>.
GLOBAL MEAN Global Mean: computes the mean of all elements in each layer of
<arg1>.
GLOBAL MEDIAN Global Median: computes the median of each layer of <arg1>.
GLOBAL MIN Global Minimum: computes the minimum value of each layer of
<arg1>.
GLOBAL MINORITY Global Minority: computes the least commonly occurring value
in each layer of <arg1>.
GLOBAL SUM Global Sum: computes the total of all elements in each layer of
<arg1>.
Matrix Matrix functions allow you to multiply, divide, and transpose matrices, as well
as convert a matrix to table and vice versa.
Other A host of miscellaneous functions provide data type conversion, various tests,
and other utilities.
ANGLE Angle: returns the angle for complex numbers and zero for other types.
57
Function Definition
CEIL Ceiling: computes the least integer greater than or equal to <arg1>.
CONJ Complex Conjugate: returns the conjugate of a complex number. For example:
CONJ ((a,b)) returns (a,-b). Returns <arg1> for other types.
EVEN Test if Even: returns true if <arg1> is an even number, false otherwise.
FLOOR Floor: computes the greatest integer less than or equal to <arg1>.
IMAG Imaginary Part: returns the imaginary part of complex numbers. Returns zero
for other types.
ODD Test if Odd: returns true if <arg1> is an odd number, false otherwise.
REAL Real Part: returns the real part of complex numbers. Returns <arg1> for other
types.
WHOLE Test if Whole Number: returns true if <arg1> is a whole number (a non-
negative integer). Returns false otherwise.
Relational Relational operators include equality, inequality, greater than, less than,
greater than or equal, less than or equal, and others.
58
Function Definition
!= (Inequality): true if <arg1> and <arg2> are not equal, false otherwise.
> (Greater Than): true if <arg1> is greater than <arg2>, false otherwise.
>= (Greater Than or Equal): true if <arg1> is greater than or equal to <arg2>, false
otherwise.
< (Less Than): true if <arg1> is less than <arg2>, false otherwise.
<= (Less Than or Equal): true if <arg1> is less than or equal to <arg2>, false
otherwise.
ISALLTRUE Test for All Non-zero: returns BINARY SCALAR regardless of input type.
If any element of input table or matrix is zero, returns false. Returns true if all elements
are non-zero.
ISNONZERO Test for Non-zero: returns BINARY SCALAR regardless of input type.
If any element of input table or matrix is non-zero, returns true. Returns false if all
elements are zero.
NE Inequality: true if <arg1> and <arg2> are not equal, false otherwise.
GE Greater Than or Equal: true if <arg1> is greater than or equal to <arg2>, false
otherwise.
LE Less Than or Equal: true if <arg1> is less than or equal to <arg2>, false
otherwise.
59
Function Definition
CELLX Cell X: returns the X dimension of the pixels in the input raster.
CELLY Cell Y: returns the Y dimension of the pixels in the input raster.
STACK DIVERSITY Stack Diversity: returns a single layer each of whose pixels
contain the number of different values for that pixel among the layers of the point.
STACK MAJORITY Stack Majority: returns a single layer each of whose pixels
contain the most commonly occurring value for that pixel among the layers of the input.
STACK MAX Stack Maximum: returns a single layer each of whose pixels contain
the maximum value for that pixel among the layers of the input.
STACK MEAN Stack Mean: returns a single layer each of whose pixels contain the
mean value for that pixel among the layers of the input.
STACK MEDIAN Stack Median: returns a single layer each of whose pixels contain
the median value for that pixel among the layers of the input.
STACK MIN Stack Minimum: returns a single layer each of whose pixels contain the
minimum value for that pixel among the layers of the input.
STACK MINORITY Stack Minority: returns a single layer each of whose pixels
contain the least commonly occurring value for that pixel among the layers of the input.
STACK SD Stack Standard Deviation: returns a single layer each of whose pixels
contain the standard deviation of the values for that pixel from all the layers of the input.
60
Function Definition
STACK SUM Stack Sum: returns a single layer each of whose pixels contain the sum
of the values for that pixel over all the layers of the input.
Statistical Local statistical operations include density, diversity, majority, mean, rank,
standard deviation, and more.
DENSITY Local Density: returns the number of occurrences of the value of <arg1>
among the input values.
DIVERSITY Local Diversity: returns the number of different values among the inputs.
MAJORITY Local Majority: returns the most commonly occurring value among the
given input values.
MAX Local Maximum: returns the maximum value in the list of input arguments.
MEDIAN Local Median: returns the median of the given input values.
MIN Local Minimum: returns the minimum value of the given input arguments.
MINORITY Local Minority: returns the least commonly occurring value among the
given input values.
RANK Local Rank: returns the number of inputs whose value is less than the value
of <arg1>.
SD Local Standard Deviation: returns the standard deviation value of the input
arguments.
MATCHES String Wildcard Match: true if <arg2> matches wildcard test string in
<arg1>.
61
Function Definition
Surface Surface functions allow you to calculate aspect and degree or percent slope.
ASPECT Aspect: computes the aspect in degrees based on a 3 x 3 neighborhood
around each pixel.
62
Function Definition
ZONAL MAJORITY Zonal Majority: returns the most commonly occurring class
value in each zone.
ZONAL MAJORITY COUNT Zonal Majority count: Returns the number of pixels in
the most commonly occurring class in each zone.
ZONAL MAJORITY FRACTION Zonal Majority Fraction: returns the fraction of the
total zone which overlaps the majority class in each zone.
ZONAL MAX Zonal Maximum: returns the maximum class value in each zone.
ZONAL MEAN Zonal Mean: returns the statistical mean class value in each zone.
ZONAL MEDIAN Zonal Median: returns the median class value in each zone.
ZONAL MIN Zonal Minimum: returns the minimum class value in each zone.
ZONAL RANGE Zonal Range: returns the range between the minimum and
maximum class values in each zone.
ZONAL SD Zonal Standard Deviation: returns the standard deviation of the class
values in each zone.
(definition) As you select objects and functions, the function definition is composed in
this text field.
If the cursor is within a prototype, the prototype will be replaced with the selected input or
function.
You can also edit your function definition by typing, as with any text editor.
63
Function Definition
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
64
Criteria
Criteria
This dialog allows you to set specific criteria that must be met on the available layers in order to
generate an output layer containing pixel values of the specified output values of the criteria that
were satisfied. This tool simplifies the process of creating a conditional statement.
This dialog is opened when you double-click a criteria graphic that has been placed on a Model
Maker page or when you select Edit | Properties from the Model Maker menu bar with a criteria
object selected.
Available Layers: Any input layers specified in raster dialogs in the model and
connected to the criteria graphic will be listed. Click on the layer you want to use.
<none defined> If no raster layers have been specified or connected to the criteria
graphic, this message will appear.
Descriptor: Click on the popup list button to view the available descriptors (attributes) for
the selected layer and to select the desired descriptor.
Once a descriptor is selected, click Add Column to add that descriptor to the Criteria Table.
Select and add columns to the criteria table for all descriptors that are necessary to determine
the classes to be output.
(cell value) Cell value is always listed as the first descriptor and, if selected, indicates
you wish to use the pixel value directly instead of a descriptor value.
Criteria Table Any descriptors selected will be displayed in the criteria table when you
click Add Column.
When all necessary descriptors are listed, enter your criteria into the appropriate fields. In
each cell of the criteria table, a relational expression is entered in terms of the descriptor
column heading that, if satisfied, will fire its output value as the output pixel value.
The Output column allows you to enter the desired value to be output when its condition is
met. Entering the same output value for multiple rows is equivalent to performing a logical OR
on those conditions (rows).
Columns: Specify the number of columns desired in the Criteria Table. Use this option to
delete columns. To add columns the Add Column button is normally used.
65
Criteria
Any Criteria Click if any criteria of any column may be met for that class or row value to
be output. This performs a logical OR of the columns.
Otherwise: Specify a value to assign to any pixels that do not satisfy any of the criteria.
Add Column Click to add a column to the Criteria Table inserting the currently selected
Descriptor into the column title.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
66
Text String
Text String
This dialog allows you to enter text to be placed on the Model Maker page, including titles and
descriptive information about the model. This dialog is opened when you click in the Model Maker
window using the icon.
This dialog also is opened when you double-click on an existing string, or when you select Edit
| Properties from the Model Maker menu bar with a string selected.
You can choose the font, size, and style of the text by clicking on the Text option of the main
Model Maker menu.
(text field) Type in the text that you want placed on the Model Maker page. The text
entered will appear on one line. Press Return when you are finished typing.
Under UNIX you can also type in special characters, such as ®, Õ, ©, etc. See the Compose
Key On-Line Help for details.
OK Click to use this text and close this dialog. This option is not enabled until you press
Return.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
67
Model Librarian
Model Librarian
This dialog consists of a file name part which displays all the existing script models. It also
contains options to edit, delete, or run the script models. These models have all been created
with the Spatial Modeler Language — they are NOT graphical models.
☞ NOTE: Do NOT try to edit graphical models with this function—use Model Maker to edit
graphical models
This dialog is opened when you click Model Librarian from the Spatial Modeler dialog.
Model Library: Use this file name part to select a script model. The default file extension
is .mdl.
Library Functions: These options enable you to edit or delete the selected model.
Edit... Click to edit the selected script model. The IMAGINE Text Editor will display.
☞ Since this deletes the model permanently, a confirmation dialog is opened to ensure that this
is what you want to do. Click Yes or No in the Confirmation dialog.
68
Vector
Vector
This dialog enables you to define a vector object in the Model Maker.
This dialog is opened when you double-click a vector graphic that has been placed on the Model
Maker page or when you select Edit | Properties from the Model Maker menu bar with a vector
object selected.
Select an: Click on the popup list button to select vector data that is in either an Arc/Info
coverage or an annotation layer.
Arc/Info Coverage
Annotation Layer
Vector Layer Name: Use the file name part to enter the file to use or click on the File
Selector button. The default file extension is for an annotation layer is .ovr and for an Arc/Info
Coverage is .arcinfo.
Prompt User for File at Run Time 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.
Feature Type: Click on the popup list button to select the feature type to be rasterized from
a vector coverage. This option is enabled only when vector coverages are being used, not
with annotation layers.
Rasterize To: Click on the popup list button to choose to rasterize the vector to Memory
Only or to a Temporary File.
Memory Only This selection specifies that the vectors or annotation are rendered tile by
tile into memory without using any temporary disk space.
Temporary File This selection specifies that the entire vector coverage or annotation
layer are to be rasterized into a temporary file
Cell Size: Use this group to specify the cell size of the rasterized output image.
Use: Select either Default or Specify.
69
Vector
Default Use the default cell size of the model. See the description of Set CELLSIZE
in the Spatial Modeler Language Manual.
Specify Click this radio button to specify the output cell size and units.
X: Select the X cell size of the output image. This option is disabled unless
Specify is selected above.
Y: Select the Y cell size of the output image. This option is disabled unless
Specify is selected above.
(units) Select cell size units from this popup list. This option is disabled unless
Specify is selected above.
Processing Window: This group lets you select a subset of the input data to use for
processing.
From Inquire Box Click to define a subset area of the data by using the Viewer Inquire
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.
Cell Value: Specify a selected attribute or set up a custom recode to be used for the grid
cell values.
Use: Click this checkbox to specify an attribute for the grid cell value then click the popup
list button to select the attribute.
Custom Recode: Click this checkbox to recode the values in the input file.
Setup Recode... Click to recode the values in the input file. This option is enabled
only if Custom Recode is on. The Recode dialog is opened.
70
Vector
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.
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. The Choose AOI dialog is opened.
➲ See the ERDAS IMAGINE Tour Guides manual for step-by-step instructions on using Model
Maker.
71