Some hints and resources

I realize I have not been terribly thorough in giving instructions with the scripts I have posted so far. They have been short and relatively simple, but in order to use them, I think you would have to be familiar with the process of running a Python script from IDLE and/or creating a script tool in ArcMap. I am using ArcGIS 10 at home, but at the office I have ArcGIS 9.3.1 installed, so the scripts and the methods by which I run them are different depending if I am at home or at work. I will try to remember to be specific about which I’m using, and give more details about how to run these scripts or import them to script tools and so forth in the future.

In the meantime, though, here are a few hints–

(1) If you see “import arcpy” near the top, I am using a computer with ArcGIS 10 and Python 2.6. If you see “import arcgisscripting” I am using a computer with ArcGIS 9.3.1 and Python 2.5.

(2) If you see lots of variables hard-coded, meaning things like “elevInput = ‘C:\\GIS\\TEST_FOLDER\\elev_10m'” then I have written the script to run from IDLE. If you see “elevInput = arcpy.GetParameterAsText(0)”, then I have written it to be used as a script tool.

(3) If you are saying, “huh?” or don’t know about scripting but want to learn, then I recommend checking out the following resources:

First, get familiar with ESRI’s online help if you aren’t already. For ArcGIS 10, go to and get familiar with the Geoprocessing Tool Reference (Professional Library > Geoprocessing > Geoprocessing Tool Reference). Also check out the bit on Creating Script Tools (and off of that, Customizing Script Tool Behavior) under Geoprocessing. For 9.3.1 Geoprocessing and Geoprocessing Tool Reference are both on the root at These are extremely helpful as they provide examples and details about the parameters.

Okay, now Python-wise, I recommend Mark Lutz’s book Learning Python ( Personally I bought the 3rd Edition because it was cheaper and covers up through 2.6, which is what Arc 10 uses.

Also, through Penn State you can access quite a lot of stuff from an online course for free at There are other resources worth a look at, while you’re at it.

And you might as well read through some of Dive Into Python:, and bookmark Okay, now don’t get overwhelmed– I think it was Lao Tzu who said what has generally been translated to “A journey of a thousand miles begins with a single step.” The journey may seem overwhelming, but you can surely handle a single step. And after that, take another when you are ready. And another. And we’re underway!

Leave a Reply

Your email address will not be published.