I want to write scripts for Erdas in Python.
I downloaded some Python examples here but I could not make much.
Where can I get the full Help material for Erdas python scripting?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
I've found a work-around to do some Imagine Python script automation for some processes. The documentation is very sparse and I've had trouble adapting the examples to do more complex processes. I do a lot of automation, and have had to use ArcGIS' Spatial Modeler tools, and was looking forward to being able to moving some of the processing over to Imagine since Spatial Modeler still uses the ancient and very limited Grid format from the old Arc/INFO days for its internal processing, and can be very cumbersome and buggy.
With the current state of the documentation, I can't figure out enough to modify more than the most basic operators directly within the model object as they do in the model examples. However, many of the processes I need to do are using what can be more-or-less static spatial models with a set number of inputs and one or two outputs.
For this, I've been able to use the Spatial Model editor within Imagine to build models to do the work I want, then use python to create a temporary copy with the strings in the GMDX file. It's basically a plain-ascii XML document, so this is a simple string manipulation problem - reading the file and replacing the path/filename string with the desired filenames generated in my script.
Then you simply open the modified model as a model object in Python and execute it. I haven't had it work variable numbers of inputs or similar problems, but it works for many applications. Since Spatial Modeler's documentation is better than its Python counterpart, this works well enough to solve many/most of my raster processing problems.