Hexagon Geospatial

Spatial Modeler Tutorials

Learn more about our products, find answers, get the latest updates, and connect with other Hexagon Geospatial product users, or get support from our professional service team.
Showing results for 
Search instead for 
Do you mean 

Calling a Model from within a Model

by AndyZ on ‎12-04-2015 11:46 AM - edited on ‎04-14-2016 06:28 AM by Community Manager (570 Views)

Download models


Applies a directional 5x5 convolution smoothing filter. This technique smooths small regions while preserving significant edges. The model implementation consists of a simple primary model calling another external model via the Spatial Model operator.


Input image and directionally smoothed output image


The directional smoothing technique uses 8 different 5x5 convolution filters representing 8 directional neighborhoods (north, northeast, etc).  A focal standard deviation is calculated for each neighborhood,  Then a convolution is selected for the neighborhood that has the least amount of variability.  This technique is useful for image generalization.


The implementation of this model illustrates use of the Spatial Model operator.  This operator enables models to call other models.  The primary model stores the full path and file name of the model it is calling.  If it cannot find the model, it tries to locate the model in the same directory as the primary model. Effectively this enables Spatial Models to be re-used as if they were Operators.



ApplyDirectionalSmoothing-v15-1-1.gmdx - the Primary Model


DirectionalSmoothing-v15-1-1.gmdx - the Model Called by the Primary Model


Input parameters:


Image In: Name of the input image to be smoothed.

Image Out: Name of the output image file created by the smoothing.