Pythonian Adventures 2

Monday, 4 February, 2008

OK, ESRI had VBA, no scripting language and some frustrated “power users”. Thankfully ESRI realised that this was a problem and from v9.0, introduced scripting via any COM standards compliant language, although Python was the preferred choice and shipped with ArcGIS out of the box. For those not familiar with Python (and I wasn’t), the Wikipedia article is pretty good and to quote from the main Python site:

“Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.



Its also GPL and runs on just about any/every OS. Python allows scripting of pretty much all ArcToolBox tools which allows access to most of ARCGIS’s underlying power without the complexity of VBA. This change to ArcGIS 9.0 formed part of a major revamp of the “geoprocessing tools” and included a new graphical programming environment called Model Builder. Like its much older partner in ERDAS Imagine (Spatial Modeller), Model Builder lets you link tools (graphically) together to form complex, conditional, spatial processing tasks. And best of all it involves no coding at all! Models can be made available to others and simplify the whole issue of “repetitive processing” essentially letting you save “tasks”. And Model Building also allows export to Python, VBScript and JScript.

So ESRI finally has a scripting language and some moderately happy power users. How does it all work in practise?? That’s for the next blog entry.

Add comment

Fill out the form below to add your own comments