Jump Start Your Spatial Models

6

So, the new ERDAS IMAGINE Spatial Model is pretty cool, huh? You like the look and feel, like the flow, like the ability to plug in Python and custom C Scripts.  But where do you start? How can I get some examples of how the experts are doing it? Today’s From the Developers post features advice from Mingzhen Chen on how to get started.

Where can I learn Spatial Modeling?

Hexagon Geospatial has launched a new eTraining page, where customers with software maintenance support can access training videos on demand. The  Creating a Spatial Model in ERDAS IMAGINE free course will walk you through how to create a simple spatial model in ERDAS IMAGINE.

But what if I already have a bunch of spatial models built in the old Model Maker?

There is no need to reinvent the wheel. If you have a bunch of models that help you, you certainly want to keep using them. The new Spatial Modeler can open the old Model Maker .gmd files and automatically convert them to the new interface.

Can you show me some more complex examples of the Spatial Models?

Sure. We believe in the Spatial Modeler so much that we actually use it to power much of ERDAS IMAGINE. If you want to see how we build models, you can go to <IMAGINE_HOME>\etc\models and open any of our .gmdx files in the Spatial Modeler. Feel free to copy parts of those and paste them into your own model.

What if I want to tweak the indices in IMAGINE to make my own custom indices in Spatial Modeler?

indicesWith a never-ending  barrage of new sensors and analytical methods, you may want to add your own custom indices. The Indices dialog, like an increasing number of dialogs in IMAGINE, lets you launch the spatial model directly from the interface.

  1. Select Indices in Unsupervised Classification group in the Raster tab.
  2. Add your input file.
  3. Check on Show All and select an Index which most closely resembles your desired formula.
  4. Click View to open the selected index in the Spatial Model Editor.
  5. Now you can easily modify the formula to create your own to custom index.
  6. Select Save as and enter a name for your index.

It can be run in Spatial Model Editor, via a simple dialog that is automatically generated or in batch.

Good luck and Happy Modeling!

Share.

About Author

Steve du Plessis

Steve du Plessis began his career in production photogrammetry in South Africa. In 1999, Steve joined ERDAS in the Atlanta headquarters as a Technical Marketing Manager, then as a Regional Manager for Europe Africa and Middle East. Steve later moved to the Singapore office, serving as the SE Asia Regional Manager, and then to the Perth, Australia office where he managed a direct sales territory. In 2010, Steve returned to Atlanta as the Photogrammetry Product Line Director then Global Product Line Executive and now Steve works with Intergraph Government Services, servicing US Federal accounts. Steve has more than 15 years of experience in the geospatial industry.

6 Comments

  1. Thank you very much for that.

    The spatial modeler editor seems to have a huge potential !

    unfortunately the help for this specific language is very weak. And there is a true lack of concrete example for the majority of the functions.

    If some other guys like me want more examples there is also this site :
    http://www.sterlinggeo.com/spatial-model-list

    • Brad Skelton

      arcpy is set of libraries that allow Python users to access ArcGIS functionality from within the Python scripting language. This is similar to the extensions that Spatial Modeler make available to Python users to enable access to Spatial Modeler functions form within Python scripts.

      To answer the question it first helps to understand the two ways in which Spatial Modeler can interact with Python. The first is to make Spatial Modeler functions available from Python and the second is to make Python available within the Spatial Modeler. In the first case, a user can make Spatial Modeler calls and ArcGIS (arcpy) calls from within the same Python script, much like a user can use IMAGINE and ArcGIS on the same computer. In the second case, there is an operator in the Spatial Modeler that allows a Python script to be executed as a part of a Spatial Model. There are no specific restrictions placed on this second mode of interaction other than the requirement that all arguments passed into and out of the Python script must be either strings or numbers. This technique has indeed been used to access arcpy functions, though this is not a guarantee that all such functions will work, as all of the arcpy functions have not been tested in this environment.

Leave A Reply