GIS Division

217 South Main Street
Salisbury, NC 28144
PH 704.638.5246

Introduction to Geoprocessing Scripts Using Python

2 days (16 hours) $600 per person

register for this course

 

Overview

The ArcGIS geoprocessing framework includes a scripting environment, and Python® is the scripting language included with ArcGIS. This course introduces the Python scripting language and shows how it can be used to access and automate geoprocessing functionality. Students learn Python scripting syntax, then begin writing scripts to automate geoprocessing operations. Students also learn how to incorporate Python scripts as custom tools in ArcToolbox.

Who Should Attend

This course is designed for experienced ArcGIS users who want to learn how to automate everyday processes or create complex analytical scripts. ARC Macro Language (AMLTM) and AvenueTM programmers who want to write scripts for ArcGIS will also find the course of interest.

 

Goals

Those completing this course will be able to

* Understand the basics of the Python scripting language.
* Understand how scripts can be used in the ArcGIS geoprocessing framework.
* Incorporate tools and environment settings into scripts.
* Incorporate cursors, describe objects, and enumerations into scripts.
* Work with scripts in ArcToolbox.
* Access resources for debugging Python code.

 

Topics Covered

* The geoprocessing framework: ArcToolbox; Dialogs; Models; Command line; Scripts.
* The basics of Python: Variables; Commenting code; String concatenation; Looping; Conditional statements; Modules.
* Accessing tools and environment settings in scripts: The Geoprocessor ArcObject; Accessing the Geoprocessor from Python; Accessing tools and environment settings from Python.
* The Geoprocessor object: The Geoprocessor Programming Model, the Geoprocessor (GpDispatch) object.
* The describe objects: Access various properties for different data types (e.g., feature classes, workspaces, datasets, raster datasets, etc.).
* The enumeration objects: Create lists of data (e.g., tables, rasters, feature classes, workspaces, fields, feature datasets, etc.).
* The cursor objects: Search cursors; Insert cursors; Update cursors.
* Incorporating scripts into the geoprocessing framework: Scripts as tools; Scripts in models.
* Finding and fixing errors: Python error handling; Identifying syntax and logical errors.

 

Prerequisites

Students should have completed Introduction to ArcGIS I or Learning ArcGIS Desktop and Introduction to ArcGIS II or have equivalent knowledge. Basic programming skills, such as using loops and conditional statements, are also required.

 

Software Used in the Course

This course is designed to work with the following software:
ArcGIS Desktop
Version
ArcInfo
9.2
 
Other
PythonWin
2.4

 

 

 

Retrieved from the ESRI website May 22, 2008.

 

 

Back to top