Python scripts can reduce the time spent on complex or repetitive tasks, enabling GIS staff to be more productive. This course teaches how to create Python scripts to automate tasks related to data management, feature editing, geoprocessing and analysis, and map production using ArcGIS. You will also learn how to share your Python scripts so your key GIS workflows are accessible to others.
Note: Course concepts apply to both ArcGIS 10.2 and 10.3. Esri will provide ArcGIS 10.3 for use during course exercises. The course data DVD includes files for ArcGIS 10.2 users.
Course introduction
Introduction
Course goals
Additional resources
Installing the course data
Icons used in this workbook
Understanding the ArcGIS Platform
1 Running scripts in Python
Lesson introduction
Understanding Python fundamentals
Integrated Development Environment (IDE)
Running scripts in Python window
Exercise 1A: Use the PyScripter IDE (Instructor-led)
Open and configure PyScripter
Run the script
The ArcPy site package
ArcPy functions and classes
The ArcPy modules
Choosing a scripting environment
Tips and best practices
Exercise 1B: Run scripts in Python
Buffer schools in Python window
Update script in PyScripter
Verify results in ArcMap
Lesson review
2 Describing data
Lesson introduction
The Describe function
Generic Describe object properties
Feature class Describe properties
Raster Describe properties
Describing a feature class and raster
Fill-in-the-blank
Exercise 2: Work with the Describe object
Describe a feature class and a geodatabase
Describe a list of feature classes
Clip raster datasets with Describe object properties
Challenge: Describe dataset and coordinate system properties
Lesson review
3 Automating scripts with lists Lesson introduction
The ArcPy List functions
Explore the ArcPy List functions Working with List functions Working with da.Walk List data
Exercise 3: Automate scripts with the ArcPy List functions List field properties
Buffer feature classes Verify script results
Lesson review
4 Working with selections Lesson introduction
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
Exercise 4: Work with feature layers and selections
Create new script
Create feature layers
Perform spatial selection
Create feature class f
rom selection
Lesson review
5 Working with cursors
Lesson introduction
The arcpy.da cursors
Using the SearchCursor
Using the UpdateCursor
Using the InsertCursor
Using the arcpy.da.Editor Tips and best practices for arcpy.da Cursors
Exercise 5: Work with cursors
Research the da Cursors
Work with the da.SearchCursor Work with the da.UpdateCursor
iiWork with the da.InsertCursor
Lesson review
6 Working with geometry objects
Lesson introduction
Creating geometry objects
Creating Point 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
Exercise 6: Work with geometry objects and cursors
Create geometry objects
Access Shape geometry
Update existing features
(Optional) Create new features
(Optional) Use a geometry object with a geoprocessing tool
Lesson review
7 Sharing scripts
Lesson introduction
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
Exercise 7: Share scripts through geoprocessing packages
Add pseudocode to the script
Write script code
Attach script to custom tool
Run script in ArcMap
Share results as a geoprocessing package
Verify the geoprocessing package
Lesson review
iii8 Automating map production
Lesson introduction
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
Customizing symbology for map layers
Exercise 8: Work with map document contents
Access map document in ArcMap
Access map document in script
Update layer symbology
Update layout text elements
Verify changes in ArcMap
Challenge: Automate script for multiple map documents
Lesson review
geoprocessing, GIS, ArcGIS, Python
Comments