Skip to Content

Introduction to Geoprocessing Scripts Using Python

Reduce the time spent on complex and repetitive workflows, so you can focus on GIS work that can’t be automated. This course teaches how to create Python scripts for key ArcGIS workflows and share them so they are accessible to others. Course assumes familiarity with Python.

Who Should Attend
GIS analysts, specialists, data processors, and others who want to automate ArcGIS tasks and workflows

After completion of this course you will be able to:
• Manage and update attribute data and features by using cursors and objects.
• Automate geoprocessing and map production operations.
• Ensure your script syntax is valid and errors are properly handled.
• Share scripts using custom script tools and geoprocessing packages.

• ArcGIS 2: Essential Workflows and ArcGIS 3: Performing Analysis or equivalent knowledge
• Knowledge of Python syntax and experience creating Python scripts. For those new to Python, Python for Everyone is strongly recommended
• Basic programming skills, including using loops and conditional statements

Course Outline

Running scripts in Python
• Understanding Python fundamentals
• Integrated Development Environment (IDE)
• Running scripts in Python window
• The ArcPy site package
• ArcPy functions and classes
• The ArcPy modules
• Choosing a scripting environment
• Tips and best practices

Describing data
• The Describe function
• Generic Describe object properties
• Feature class Describe properties
• Raster Describe properties
• Describing a feature class and raster
• Fill-in-the-blank

Automating scripts with lists
• The ArcPy List functions
• Explore the ArcPy List functions
• Working with List functions
• Working with da.Walk
• List data

Working with selections
• Selection tools in ArcMap
• Terms commonly used when working with selections
• Tools that accept feature layers
• Working with a selection
• The MakeFeatureLayer tool
• The FieldInfo object
• The AddFieldDelimiters function
• Determining a workflow
• Create a feature layer and get feature count

Working with cursors
• The arcpy.da cursors
• Exploring the data access cursors
• Tips and best practices for arcpy.da
• Cursors Using the SearchCursor
• Using the UpdateCursor
• Using the InsertCursor
• Error handling with Python
• Error handling with the try-except statement
• (Optional) Using the arcpy.da.Editor

Working with geometry objects
• Creating geometry objects
• Creating Point geometry objects
• Creating Polyline geometry objects
• Creating Polygon geometry objects
• The geometry object
• Constructing multipart geometry
• Constructing multipart polygons
• Creating and updating feature geometry
• Using a geometry object with geoprocessing tools
• Accessing geometry objects

Sharing scripts
• Terms commonly used when sharing scripts
• Scripting advantages in ArcMap
• Making scripts dynamic
• Debugging scripts in PyScripter
• Creating and sharing a script tool
• Advantages of attaching a script to a custom tool
• Using the Add Script wizard
• Running a script
• Sharing a script
• Plan out a project
• Share results as a geoprocessing package
• Verify the geoprocessing package

Automating map production
• The arcpy.mapping module
• Terms commonly used when working with the arcpy.mapping module
• Using the arcpy.mapping module to modify map document contents
• Referencing the map document
• Listing map document contents
• Managing layers
• Managing layout elements
• Publishing maps
• Exporting maps and reports
• Migrating scripts to ArcGIS Pro
• Customizing symbology for map layers