Funny how we think back to the past and say things like “the world was a simpler place back then”. I was sitting having some beers with a couple long time GIS friends and one of them started going off on how much better his life was back with ArcInfo and AML[1]. We went though the workflows back then; ArcEdit, ArcPlot[2] and the rest. Removing the specific programs from the work flow, we are left with one clear point of GIS analysis in 1997, scripting.
Back then, if you needed to convert a file, re-project it, buffer it and then clip it, build it or clean it; you did it all within one text file (usually ending with .aml). There wasn’t any one off GUI wizard that you ran, you planned out what you wanted to do, authored a AML script, ran it and then took some time out for a cup of coffee. That seems to have been lost and probably because AML was essentially deprecated the minute ArcGIS 8 arrived.
But in 2011 we have a great scripting language that no only can replicate those AML workflows of the past, but bring in new tools that can help get our work done faster. That would be Python. There is no reason why, right now, you shouldn’t close out your ArcGIS Toolbox window and start using ArcPy.
import arcpy
from arcpy import env
env.workspace = "c:/workspace"
# variables
in_features = "soils.shp"
clip_features = "study_boundary.shp"
out_feature_class = "c:/workspace/output/study_area_soils.shp"
xy_tolerance = ""
# Execute Clip
arcpy.Clip_analysis(in_features, clip_features,
out_feature_class, xy_tolerance)
Shoot that is easy, isn’t it? It all works that way and the ArcGIS help includes all you need to copy and paste to start using python for your analysis at the bottom of each help article. Plus if you are “that guy” who remembers ArcPlot fondly, there is a whole ArcPy Mapping Module that gives you all that power to manipulate MXD and LYR files using Python.
Remember AML fondly if you must, but today with Python you have tools that run circles around what AML gave you. I find myself opening up a command window and running python commands to manipulate data over starting up ArcCatalog these days and I love it.
No more excuses to not use Python.
[1]: Don’t we all have one of these friends, the one who thinks that AML and Avenue were the high point of their GIS existence.
[2]: Actually there is no reason to fondly recall ArcPlot. I hope it does a slow painful death on some HP-UX server in a hot room in the sky.