Introduction to Geoprocessing Scripts Using PythonOverview - 2 days - The ArcGIS 9 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. Audience - 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 9 will also find the course of interest. 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 and Recommendations - Students should have completed Introduction to ArcGIS I or Learning ArcGIS 9 and Introduction to ArcGIS II or have equivalent knowledge. Basic programming skills, such as using loops and conditional statements, are also required. |
|
|
|
|
||