What are Python Scripts and Why would I want to use them?

Computers today are pretty easy to use compared with the old ones. In learning programming, we pull back the "easy to use" "graphical user interlace" so we can program the computer to do virtually any task we want.

Kids react to Apple IIe

Using GIS programs, like ArcGIS or Quantum GIS, can get you a long way but eventually you may find yourself doing the same task over and over again on a number of data sets. This can be very tedious and error prone if the task is more than even one or two steps. This is where "Scripting" comes in. Scripts are text-based programs that you can write to do a huge variety of things. They include the ability to do the same task over and over again like process hundreds or even thousands of files. Scripts can also include logic to say look for certain attributes in a set of Shapefiles and copy all the shapes with those attributes to a new file. Scripts can also be written to harvest data from the web, update databases regularly, and so on, the list is endless.

Specifically you can use Python scripts to:

Python is the most popular programming language within GIS and is rapidly gaining popularity in other fields. Python is relatively easy to learn and very easy to use. Python is an OpenSource project (see

The big advantage of Python is that it can access a large number of "packages". This includes not only ArcGIS but also the OpenSource GIS tools like FWTools (Proj4, GDAL, and OGR). Python can also access the "R" statistical package, packages for charting, higher math functions, 3d graphics, and lots of others.

You'll want to use scripts because they will make your job easier. If Python is you first programming language, it will take a little while to get used to but follow the lessons provided here and you'll be up and running in no time. Then we'll teach you how to tackle just about and problem thrown your way. You'll also learn when you've hit the limits of a computers performance or memory and need to take a different approach.

© Copyright 2018 HSU - All rights reserved.