The MODEL command is used to introduce a block of commands which are to be applied over an area of a database.
MODEL [ON filespec [OVER window_spec]] modeling_command_list ENDMODEL
where
filespec - a database name, or a handle returned by DBOpen()
window_spec - a subwindow to operate on, which is defined either
by a vector (a numeric array or parameter with four
values), or by four values: XOff, YOff, XSize, YSize
modeling_command_list - sequence of operations on the model
The modeling_command_list can be any of a variety of commands. The most important command that can be applied in a model is a modeling assignment. This is a normal assignment (LET) statement, using database channel specifiers for "assigned to" and "source" values.
If the window specification is not provided, the entire source database area is operated on. If no database name is provided, the last database opened with DBOpen() is used. If no databases are open, the FILE parameter is inspected and used. If this database cannot be opened, the MODEL command will fail.
It is also possible to enter modeling assignment operations without the MODEL/ENDMODEL command in some cases. Any assignment statement for which the "assigned to" value is a channel, will be considered an implicit model and the usual rules for a default database of operation will apply.
For example, the following commands will set all of channel 8 of irvine.pix to zero in a manner similar to the CLR function.
FILE="irvine.pix" %8 = 0
Modeling can be used for both imagery and raster GIS applications. The examples presented here have been selected to show a range of possible applications and to stir the user's imagination.
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.