Hexagon Geospatial
MENU

Developers Knowledge Base

Read articles and post questions in this comprehensive developer community and support forum.
Showing results for 
Search instead for 
Do you mean 

Spatial Modeler Basics

by Technical Evangelist ‎10-06-2015 10:38 AM - edited ‎06-22-2016 01:03 PM (1,486 Views)

Below is a brief overview of the basic Spatial Modeler concepts.  Familiarity with the operation of the IMAGINE Spatial Modeler Editor may be helpful, but it is not necessary.  More information about Spatial Modeler and Spatial Modeler operators and data types is located in online help.  You can find a link to the online help on the Welcome page linked to in your Windows Start menu or Windows Start screen.  You can also find the online help here.

 

Spatial Modeler Objects

 

SMSDK Object Diagram.png

 

 

Model

A Spatial Model is a collection of interconnected operators.  The Model object manages the list of operators which are assembled to make the model.  In addition it manages the list of operators “tails”, which are the starting points for pull operations.  A graphical example of a model, as it is represented in the ERDAS IMAGINE Spatial Modeler Editor (not included in the SMSDK), would be the simple model below.

SM Basics Model.png

 

Operator

The main building block of Spatial Modeler is an operator.  An Operator is a self-describing object that is responsible for encapsulating a computational element.  It is responsible for producing zero or more outputs from zero or more inputs.  These input and output points are called ports. Ports allow data to flow through an operator.  They also contain information about the operator’s connections with other operators.  In a connection, the operator that runs first is called the parent operator, and the operator that runs second is the child operator.  In the example above the rectangular objects are operators.

 

Data

Data is the “unit of currency” between operators.  This abstraction allows any type of data to be processed.

 

Conversion

A Conversion is responsible for converting between different data types.  It is used to allow interconnecting operators that deal in different Data.

 

Port

The connection points between operators are known as ports.  A port has one or more supported data types, such as raster, features (vector), string, filename, and so on.  Ports are defined as either input or output.  They can also contain default data.  The pointed rectangles along the sides of the operator in the above diagram are ports.

Some operators will accept a variable number of the last input port.  The Add operator, for example, can take any number of inputs (a minimum of two).  Ports can be added to or removed from these operators.

 

DataRequest

A DataRequest object is responsible for framing (modularizing) a data request from an operator.

 

UI_Provider

UI_Provider is responsible for presenting a Dialog to show and edit the set of properties for an operator.

 

Other Spatial Modeler Concepts

 

Sub-models

Groups of operators can be selected and converted into a sub-model. You may create a sub-model to reduce the apparent complexity of a model, or you may do it so that you can reuse a piece of your model multiple times.  For more information, see Models and Sub-models at the end of this document.

 

Flow Control vs Data Flow

The Spatial Modeler architecture is a Data Flow architecture.  This means that inputs to one operation are the outputs of another operation.  The order of operation is not explicitly defined, but is determined implicitly by the connections in the model.  This is different from a Flow Control architecture where the sequence of steps is specified by the connectivity of the steps.

 

Pull architecture

Spatial Modeler uses a pull model type of observer pattern where the end of the model chain requests data from its parent(s) and waits until the requested data is provided to it.  This allows the chain to process only the data necessary to satisfy the request, so a subset of the input data may be used.

 

Previous article:  Development Environment for the Spatial Modeler SDK

Next article:  Spatial Modeler SDK API

Overview
Contributors