Repetitive tasks are what computers do best.

James Fee recently noted that 2011 will be the year of scripting GIS tasks using Python. I’d like to share a few thoughts I had while reading his writeup.

Back in 2003, when I was learning GIS using ArcGIS 8, I wanted to put together a map of lottery winners in New Jersey by ZIP code. (I’ve since recreated the map as a set of interactive web maps.) I wrote a quick and dirty script in Perl that hit the State Lottery’s website and downloaded the number of winners in each ZIP code. After I came out of “the zone” and watched the script work away, I thought, “why can’t I do that with ArcGIS?” I wasn’t going to manually type in each ZIP code and insert my findings into a table. Considering it was a “let’s see if I can do it” project, I would have likely lost interest before getting all of my data. I knew better than to go the data-entry route and wrote a script to do it for me. Repetitive, mindless tasks are what computers do best – I was able to have it gather data (tedious, but necessary) to allow me to make the maps (the fun part) in an afternoon. Being able to automate some of the tedious aspects of GIS would be a blessing.

I did some searching and picked up the then-recently-released Getting to Know ArcObjects and started learning about scripting ArcGIS with VBA. I spent hours learning and then creating tools to complete my senior seminar research. I was kicked by the marching boots of progress when ArcGIS 9 came out with the revised ArcToolbox which included many tools that did exactly what I had spent hours writing to use in ArcGIS 8.

The sun is setting on VBA and while I don’t feel shafted like those people that invested a massive amount of time and brain cells on Avenue, I still loathe VB. While I rarely used it, I appreciate the straightforwardness of AML and my mind can’t wrap itself around the needless complexity of Visual Basic. When I learned that Python was going to be the language of choice for scripting, I dove in and honed my skills. Even though ModelBuilder is a great tool and helps students understand the concepts behind scripting and modeling, it is still limited compared to everything you can do with the geoprocessor and Python.

Python is worlds apart from VB in all the right ways. Something about the language clicks with me and it never seems like a chore to write Python code. I wasn’t afraid that my efforts in learning the language wouldn’t be wasted as Python serves many purposes, like Perl once did.

Here’s to Python in 2011! Happy scripting!

This entry was posted in ESRI, Technology, Uncategorized and tagged , , , , , . Bookmark the permalink.

Comments are closed.