Introduction


GIS Programming Makes You Lazy

Table Of Contents

Next

 

The title of this series is "GIS Programming Makes You Lazy."

The goal will be to teach introductory lessons on how to program in a GIS environment, mostly for newbies but people with experience may find some of the later lessons useful.  The goal is not to teach you how to create a GIS. 

Hopefully, we will start inside a GIS, and then move to programming outside the GIS using the built-in components, and eventually get some experience using Web-Based Programming.

What this series is and isn't:  This is not a series of lessons to teach you how to program.  We will learn by doing.  It'll be easier with a background in Visual Basic, but I try and explain things along the way.  My goal is not to create an all encompassing set of lessons.  I hope to give you foundations, and show you how to build on those foundations to go further and create the programs you need to create.

The perspective of these lessons is not from a computer programmer, so there are probably more efficient ways to write some of the coding examples.  I generally have a brute-force approach, and my code can sometimes be inelegant.  I am a GIS Analyst, and that is my main perspective.  I assume that the programs or scripts that you will be writing are to facilitate your work or add functionality, not to redistribute.  If that is the case, you should really take a programming class/course.

The restraints of the lessons.  These lessons are ESRI and Microsoft centric.  This means that almost every lesson revolves around ArcGIS 9.2 and Visual Basic.  Some lessons cover Python as well.  Inside the ArcGIS environment we will use Visual Basic for Applications, and outside we will use Visual Basic 2005 (.NET 2.0).

So, does GIS programming make you lazy?  Case in point.  I had an mxd file with over 50 layers in it.  The render time was slow on this file, and to speed things up I wanted all the layers turned off.  In the amount of time that it would have taken me to manually turn off the layers, I wrote a few lines of code to do it for me.  Which way was better?  The second in my opinion, because now I have a few lines of code that can be used over in different projects.  So while taking the same or even longer to write the code as just manually turning them off, I will save time in the long run by reusing the code.

Now, where to go for help if you don't understand something in these lessons.

ESRI has two good sites:

ArcObjects

ESRI Forums

If you are lost with any of the programming languages used, simply google Tutorial and the name of the language, and I'm certain you'll find some good references. 

VBA Tutorial

I hope you enjoy these lessons.  Please visit my blog to comment on a particular lesson.  I'll update the blog as I go.