This 3 day Python course covers all the fundamentals of the python programming language as well as its use in a GIS environment through the use of the ArcPy GIS library. The course shows you how Python scripting allows you to automate workflows and manipulate and change map documents and layers; how its flexibility and fully functional scripting language helps you take your use of ArcGIS to the next level by improving efficiencies and optimising processes.
You will learn: the basics of the Python language; the skills to leverage ArcPy and the Python scripting language to perform and automate Geoprocessing tasks in ArcGIS; to use ArcPy to automate data processing and analysis tasks; how map related tasks can be automated with python scripts with applications for bulk map production, map packaging and data migration using ArcPy.mapping. See course dates below.
The start of your python programming journey. On the first day you will learn the basics of the language which will make up the foundation of your future programming projects.
You will learn:
Exercise 1 – Python basics
What is Python?; Python window; what is ArcPy?; Python variables; Python if statement; Python iteration (looping); exporting models to Python scripts; editing python scripts using IDLE; outputting messages from Python; optional exercises: running Python code from command line; and using Python in field calculator
Exercise 2 – Non-tool functions of ArcPy
ArcPy documentation; cursors in ArcPy; and using list functions of ArcPy; optional exercises: cursor challenge 2.1 ; list functions challenge 2.2 through to 2.4
Exercise 3 – Python for Geoprocessing (ArcPy)
Using geometry in Python; creating parameters; optional exercises: cursor challenges 3.1 through to 3.5
Exercise 4 – Python for mapping (ArcPy.mapping)
What is ArcPy.mapping?; modifying maps, layers and data frames using Python; exporting maps to PDF using Python; optional exercises: Python for mapping challenge 4.1 and 4.2
This part of the course focusses on providing you with the skills to fully leverage ArcPy and the Python scripting language to perform and automate Geoprocessing tasks in ArcGIS. Using ArcPy to automate data processing and analysis tasks will greatly improve the way you leverage the capabilities of ArcGIS by improving efficiency and developing more resilient methodologies.
You will learn:
Exercise 1 – Using Esri’s PythonTemplate for ArcPy
Where to find the Python template for ArcPy?; what’s in the PythonTemplate for ArcPy?; header of comments - import statements - testing script in IDLE - pass statement - running Python script tool - sys.argv - functions are defined using def - try/except - defining another function in same script; running Python scripts (with parameters) from Python scripts; optional exercises: miscellaneous features of Esri’s PythonTemplate script; and comments (#) vs docstrings (""")
Exercise 2 – Data access module
Format string syntax; working with Python dictionaries; data access module (arcpy.da); list Geodatabase domains and permitted values - dictionary returned for coded value domains - tuple returned for range domains; access domains for feature classes; access domains for feature classes (challenge); comparing original and new update cursor performance; ssing arcpy.da.UpdateCursor to move features - Arcpy.da. UpdateCursor challenge; walking through workspaces to process spatial data types
Exercise 3 – Python Toolboxes
Add Python Script Tool to Standard Toolbox; add Python Script challenge; convert standard Toolbox to Python Toolbox; create new Python Toolbox from Catalog Window; Create New Python Toolbox from Python Template for *.pyt; Code New Tool in New Python Toolbox; Add New Parameter to Tool in Python Toolbox
Exercise 4 – Creating desktop add-ins using Python
What is a Python add-in?; create an add-in project; create an add-in toolbar; testing the add-in; sharing Python add-ins
The final day of training explores how mapping tasks can be completed with increased efficiency by using the Arcpy.mapping module. The majority of map related tasks can be automated with python scripts with applications for bulk map production, map packaging and data migration.
You will learn:
Exercise 1 – ArcPy.mapping module
ArcPy.mapping Module Text Element; Legend Element; Challenge 1.1 - Picture Element; Challenge 1.2 - North Arrow
Exercise 2 – Automating map production
Setting up a map document; using group layers; naming layout elements; moving layout elements before PDF export; move text from off the layout; challenge 2.1 - move text relative to the legend; challenge 2.2 - labelling
Exercise 3 – Creating Map Series
Creating map series; challenge 3.1 – change selection; challenge 3.2 – legend limit; Optional exercise: challenge 3.3 – legend limit
Exercise 4 – Updating map data sources
Updating data in maps; challenge 4.1 - parameters; challenge 4.2 – subfolders
NGIS reserves the right to cancel, postpone or re-schedule courses due to low enrolments or unforeseen circumstances. Where a fee refund is due, such a refund will be provided within 30 days. NGIS will have no further liability.