You are on page 1of 5

GEOG 4303/5303 (Spring 2012)

GIS Programming for Spatial Analysis


Lecture: Labs: Instructor: E-mail/phone Office Hours: M 46:30pm GUGG 2 W 4-6:50pm & R 11am1:50pm KESDA Lab Guggenheim 6 Stefan Leyk (Office: GUGG 201F) TA: Galen Maclaurin stefan.leyk@colorado.edu / 2-4695 galen.maclaurin@colorado.edu T 2-3pm, or by appt. M 34pm & R 2:30-3:30pm (KESDA)

OVERVIEW: This course focuses on the extension of geographic information systems (GIS) through programming as well as on the development of algorithms for spatial analysis and information extraction in vector and raster data. We will cover different concepts, principles and techniques of programming that help you to solve a variety of spatial problems in physical and human Geography. You will learn how to work with Python for Geoprocessing in ArcGIS as well as for spatial programming in gridded data using Numpy. Furthermore you will understand the basic ideas of object-oriented and procedural programming. You will develop skills to explore, handle, manipulate and model spatial data as well as for methods development. During the last weeks of the term students will work in small groups on a project, which has been proposed by the group leaders. The topics may be related to the research conducted by the group leaders. Homepage: http://www.colorado.edu/geography/leyk/geog_4303/ PREREQUISITES: At least GEOG 4103/5103 or comparable is required. Students are expected to be familiar with GIS principles and concepts. Working experience with ArcGIS 9.x or ArcGIS 10 is required. GEOG 4203/5203 or experience in using ModelBuilder would be advantageous. Programming experience is not a prerequisite but would certainly be helpful. CLASS MEETINGS: Concepts and theoretical aspects will be covered. From time to time an exercise/demo and a linked discussion will take place to better understand the implementation of some key issues. Lectures are linked to five lab assignments (see below). Part of the class meetings will be used for student presentations. Please, switch off cell phones! Attendance in lecture is required if presentations of other students are scheduled. You are fully responsible for getting the information covered in lectures. The last weeks of the term are devoted to project work where students are working in small groups. During these weeks class meetings are used for special topics and feedback or advice regarding the ongoing project work. The schedule given below is subject to some minor changes depending on the interest of students and needs for the class. LABS: Students must register for one lab session every week. Programming is hard work which you have to practice. For this reason attendance in labs is REQUIRED. Three points will be taken off your final grade for each missed lab. Exceptions require the permission of the professor. MAIN READINGS & RESOURCES: We have seen an explosion of Python books and tutorials, recently. In the meantime some books that combine programming and GIS appeared. However, in class we mainly rely on online tutorials, help sources and e-books. For each of the categories below the main sources you should get used to, are indicated by * (and you dont have to pay anything for them). PYTHON INTRO
*Swaroop. 2004. A Byte of Python. Swaroop C H / released under Creative Commons License; http://www.swaroopch.com/notes/Python , 110 pp.; as PDF from the class homepage (BP) *Guido van Rossum and Fred L. Drake, Jr. 2006. An Introduction to Python - The Python Tutorial (version 2.6), Python Software Foundation. Find it at http://www.python.org/doc/ (PyIntro)

PYTHON & GIS


*ArcGIS 10 Desktop Help/ Resource Center. 2012. http://help.arcgis.com/en/arcgisdesktop/10.0/help/ (ArcHelp) Nathan Jennings. 2010. A Python Primer for ArcGIS. CreateSpace, pp. 458 (JEN) Erik Westra. 2010. Python Geospatial Development. Packt Publishing, pp. 508 (WES) For ArcGIS 9.3 (not yet available for ArcGIS 10): Environmental Systems Research Institute. 2005. Writing Geoprocessing Scripts With ArcGIS. ESRI Press, pp.97 (GPArc) *Environmental Systems Research Institute. 2007. Geoprocessor Programming Model for ArcGIS 9.3. ESRI, Inc. (GPM)

PYTHON SCIENTIFIC COMPUTING & STATS


*SciPy. 2010. NumPy User Guide. Release 1.5.0.dev8040. available at available at http://numpy.scipy.org/ (NumUs) *Travis Oliphant . 2006. Guide to NumPy. available at http://numpy.scipy.org/ (NumPy) Ivan Idris. 2011. NumPy 1.5 Beginner's Guide. Packt Publishing, pp. 234.

GRADING: Grading depends on whether you are an undergraduate or graduate student and whether you are a

project leader or not. Here is the key for grading:


UNDERGRADUATE GRADUATE Lab Exercises (5 exercises) 100 pts 100 pts Class Participation 15 pts 15 pts Group Project (team) 30 pts 30 pts Group Project (individual) 35 pts 35 pts Total 180 180 Project leaders can earn an extra credit (20 pts) and can receive a maximum of 200 pts, respectively. Lab assignments have to be submitted at the beginning of the next exercise. For late assignments 20% of the points are taken off the final score for each working day they are late. It is important that you submit in time even if you did not finish. GROUP PROJECTS: During the final weeks of the term, students will work in small working groups on a chosen programming problem. Three presentations have to be given (a proposal by the project leader, a progress report and a final presentation) to the class. To become a project leader, you must submit a written topic/case (abstract) by Feb 13, and find at least one other student to work with you. Additionally you must have GIS data at hand by Mar 12 (otherwise come and talk to me or Galen early enough if you need advice). W Day Lecture
1 01/16 Introduction (cl 1) Programming Basics, Python, GP Scripting Basics (cl. 2) 2 01/23 Automation & Iteration in Spatial Modeling (cl. 3) Python Basics (cl. 4) 3 01/30 The Geoprocessor Object, Tools and Methods in Python (cl. 5) The Geoprocessor Object, Tools and Methods in Python (cl. 5) 4 02/06 Variables, Properties & objects, Text files (cl. 6) Variables, Properties & objects, Text files (cl. 6) 5 02/13 Modules & Functions (cl. 7) [Project proposals due] Modules & Functions (cl. 7) 6 02/20 Operators, Logic & Decisions, Debugging (cl.8) Operators, Logic & Decisions, Debugging (cl.8) 7 02/27 Spatial Data Manipulation and Editing/ Sampling exercise (cl. 9) Manipulation and Editing/ Sampling exercise (cl. 9) 8 03/05 Proposal Presentations (Project leaders) Sampling in Space using Geometry (cl. 10) Project group selection 9 03/12 Raster Processing & Numpy: Access, Neiborhood, Filtering (cl. 11) Raster, data capture and modeling (cl. 12) 10 03/19 Extraction & Recognition (cl. 13) Exercises Distance Functions and Raster Processing 11 03/26 Spring break Spring break 12 04/02 GDAL & OGR/ Project Advice (cl. 14) GDAL & OGR/ Project Advice (cl. 14) 13 04/09 Status Presentations Status Presentations 14 04/16 Objects and classes in Python (cl. 15) / Project Advice Objects and classes in Python (cl. 15) 15 04/23 Review on Python for Spatial Programming Final Class Discussion 16 04/30 Final Project Presentations Final Project Presentations

Reading
BP, PyIntro, GPArc JEN ArcHelp, ArcMB, JEN BP, LP, PyDive, PyRM ArcMB , ArcHelp, GPArc, GPM,JEN BP, LP, PyDive, PyRM BP, LP, PyDive, PyRM BP, LP, PyDive, PyRM ArcHelp, GPM, JEN

Lab Exercise
Py Exercises Lab 1: PythonWin & Geoprocessing Lab 2: Spatial Data Explor. & Manipulation Lab 2 cont. Lab 3: Geometry & Sampling Lab 3 cont. Lab 4: Implementation of Spatial Algorithms Lab 4 cont.

PyNum, GDALWeb NumUs PyNum

Lab 5: Raster-based programming and Numpy Lab 5 cont.

PyNum, GDALWeb, WES

Work in project groups Work in project groups

BP, LP, OOP1-3 BUG, SWE PyGuide, ArcPy

Work in project groups Testing of projects Final report due 04 May 2012, 8pm

FURTHER READINGS (just recommendations and useful links):


David Ascher, Paul F. Dubois, Konrad Hinsen, Jim Hugunin, Travis Oliphant . 2001. Numerical Python. Lawrence Livermore National Laboratory, Livermore, CA 94566 . available at http://numpy.scipy.org/ (old version) Kurt Swendson. 2007. A Comparative Analysis of Programming Languages for GIS. Papers in Resource Analysis 9. Saint Marys University of Minnesota Central Services Press. Winona, MN. Retrieved (date) from http://www.gis.smumn.edu/ (SWE) Zhi-Jun Liu (Editor), David Percy, and Larry V. Stanislawski. 200(?). GIS Programming: Concepts and Applications (Hardcover), CRC, pp. 250 (almost published for three years now!) Keith E. Bugg. 2003. GIS programming: prepare for the gathering storm. (GIS Development). GEO World 16(8), pp.30-32 (BUG) Howard Butler. 2004. A Guide to the Python Universe for ESRI Users. Proceedings of the Twenty-Second Annual ESRI User Conference. Available at http://www.esri.com/news/arcuser/0405/files/python.pdf (BUT) Ken Lunn. 1997. Object Oriented Analysis and Design - Course Notes. Free ebook, available at http://www.freetechbooks.com/object-oriented-analysis-and-design-course-notes-t577.html (OOP1) Timothy Budd. 2001. An Introduction to Object-Oriented Programming. , Addison Wesley; 3rd edition, pp. 648 (OOP2) Peter Coad and Jill Nicola 1993. Object-Oriented Programming , Prentice Hall PTR, pp. 582 (OOP3) Christopher Moore, Tiffany Vance, Nazila Merati, Sharon Mesick. 2006. GeoModeler--Linking GIS and Oceanographic Models. Proceedings of the Twenty-Fourth Annual ESRI User Conference 2006 Jo Wood. 2002. Java Programming for Spatial Sciences Python: Mark Lutz, Learning Python: Powerful Object-Oriented Programming, OReilly, 4th edition, pp. 1216. (LP) Guido van Rossum. 2009. PYTHON 2.6 Reference Manual. CreateSpace. Release 2.6, pp. 286, (PyRM) Mark Pilgrim. 2004. Dive into Python. Prentice-Hall, pp. 311, available from the course homepage (PyDive2) Mark Pilgrim. 2009. Dive into Python3. Apress, pp. 360, available from http://diveintopython3.ep.io or from the course homepage (PyDive3) Howard Butler. 2004. A Guide to the Python Universe for ESRI Users. Proceedings of the Twenty-Fourth Annual ESRI User Conference 2004 (PyGuide) Alan Gauld. 2007. Learning to Program Using Python. available at http://www.freenetpages.co.uk/hp/alan.gauld/ ESRI & ArcObjects Environmental Systems Research Institute. 2007. Geoprocessing Data Types of Parameters and Environments. ESRI, Inc.(GPData) Environmental Systems Research Institute. 2006. Geoprocessing in ArcGIS. ESRI Press, pp.66 (ArcMB) Robert Burke. 2003. Getting to Know ArcObjects. B&T. pp. 436 (BUR) Kang-Tsung Chang. 2008. Programming Arcobjects with VBA: A Task-Oriented Approach. CRC Press Inc, 2nd edition, 360 pp. (CH) Michael Zeiler. 2001. Exploring ArcObjects. ESRI, Redlands, CA, 2001 (ZEI) Environmental Systems Research Institute. 2005. ArcGIS 9 - Geoprocessing Commands Quick Reference Guide. ESRI Press, pp. 208 (GPQR) IMPORTANT ONLINE RESOURCES: SciPy Scientific Tools for Python: http://www.scipy.org/ GDAL Homepage: http://www.gdal.org/index.html (GDALWeb) Python Official Homepage & Online Documentation: http://www.python.org Free Computer books for Python: http://www.onlinecomputerbooks.com/free-python-books2.php Downloadable scripts and material from ESRI: http://support.esri.com/index.cfm?fa=downloads.geoprocessing.scripts Alan Gaulds Homepage for Learning to program: http://www.freenetpages.co.uk/hp/alan.gauld/ It would be overwhelming to list more resources - further material will be given during lectures.

Department of Geography Code of Conduct


In the Department of Geography, instructors strive to create an atmosphere of mutual trust and respect in which learning, debate, and intellectual growth can thrive. Creating this atmosphere requires that instructors and students work to achieve a classroom in which learning is not disrupted. At the most basic level, this means that everyone attend class, be prepared with readings and assignments completed, and that students pay attention. This means no conversations with friends, reading the newspaper, coming late, or leaving early. Such behavior is disruptive to the instructor and to your fellow classmates. These basics of classroom etiquette are an important means of building and showing mutual respect. Inevitably, however, disagreements will arise. Sometimes these disagreements will be about content, sometimes about grades or course procedures, and sometimes they will be about the treatment of participants in the class. In order to facilitate the resolution of these disagreements, the following guidelines should be followed by everyone: All interactions must be guided by mutual respect and trust. If you are bothered by some aspect of the class, identify what it is that is bothering you and center the discussion on that issue. Address issues that concern you early. Problems are easier to resolve before they fester. Consider whether it is best to address your concerns in class or in a separate appointment with the instructor. Remember, behavior that disrupts your fellow classmates is not acceptable. Abusive speech or behavior will not be tolerated in any interaction between students or between student and instructor. If an instructor feels that your speech or behavior is abusive, you will be asked to leave the room. If you believe an instructor has become abusive, you may leave the room and talk with the department chairperson. Debate and discussion can continue when all parties proceed with mutual respect. If mutual respect cannot be restored, either you or the instructor may take the issue to the department chairperson or the Campus Ombuds Office. Policy on Plagiarism Plagiarism is the act of using someone else's words, pictures, ideas, or procedures without proper acknowledgement, or to present them as if they originated with you. In science and especially in academics, plagiarism is unacceptable. In an exam, for example, copying from someone else's test booklet and handing it in as if it were your own work is plagiarism. In some instances it is difficult to document whether plagiarism has occurred. In other situations, particularly learning situations, it is possible that students who do not know the protocols of academic expression can inadvertently plagiarize. In some cultures, direct use of another person's words bring great honor to the quoted person. In this university, plagiarism constitutes a form of cheating, and will not be tolerated. If you are unsure whether to cite someone else's work as you work through an assignment, come talk with me about it. The Honor Code THE PLEDGE "On my honor, as a CU Boulder student, I have neither given nor received unauthorized assistance on this work." Students may be asked to include this pledge on their written assignments and tests. The full Honor Code is available for your review on line, at http://www.colorado.edu/law/about/honorcode/.

GEOG 4303/5303 Spring, 2012 QUESTIONNAIRE

NAME_________________________________

YEAR _________

MAJOR______________________

CONCENTRATION _________________

WHAT OTHER COURSEWORK have you taken related to GIS, Cartography, Remote Sensing or Programming? 1. ___________________________ 2. ___________________________ 3. ___________________________ 4. ___________________________

WHAT DO YOU EXPECT TO LEARN BY TAKING THIS COURSE? ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________

WHAT CONCERNS DO YOU HAVE ABOUT TAKING THIS COURSE? ____________________________________________________________________________________ ____________________________________________________________________________________ ____________________________________________________________________________________

Thank you very much. This information is important for me to know who you are.

You might also like