GIS Tutorial for Python Scripting uses practical examples, exercises, and assignments to help students develop proficiency using Python® in ArcGIS®. This workbook for Python scripting builds upon previously acquired GIS skills and takes them to the next level with the use of Python. Knowledge of Python™a key tool for scripting geoprocessing functions and tasks in ArcGIS for Desktop™is expanded through hands-on programming geared to automating GIS applications. Exercise data is provided, and instructor resources are available.
Workbook for learning how to use Python with ArcGIS for Desktop.
Preface |
|
vii | |
Introduction |
|
ix | |
|
Chapter 1 Using Python in labeling and field calculations |
|
|
1 | (38) |
|
Tutorial 1-1 Python introduction and formatting labels |
|
|
2 | (8) |
|
Tutorial 1-2 Decision making in the Label Expression dialog box |
|
|
10 | (7) |
|
Tutorial 1-3 Using Python in the Field Calculator |
|
|
17 | (7) |
|
Tutorial 1-4 Decision making in the Field Calculator |
|
|
24 | (7) |
|
Tutorial 1-5 Working with Python date formats |
|
|
31 | (8) |
|
Chapter 2 Writing stand-alone Python scripts |
|
|
39 | (90) |
|
Special introduction: Working with Python |
|
|
40 | (6) |
|
Tutorial 2-1 Creating describe objects |
|
|
46 | (7) |
|
Tutorial 2-2 Scripting geoprocessing tasks |
|
|
53 | (9) |
|
Tutorial 2-3 Coding for multiple geoprocessing tasks |
|
|
62 | (7) |
|
Tutorial 2-4 Using while statements |
|
|
69 | (9) |
|
Tutorial 2-5 Using lists and for statements |
|
|
78 | (8) |
|
Tutorial 2-6 Building script tools |
|
|
86 | (15) |
|
Tutorial 2-7 Using cursors |
|
|
101 | (12) |
|
Tutorial 2-8 Combining loops |
|
|
113 | (7) |
|
Tutorial 2-9 Creating custom toolbars |
|
|
120 | (9) |
|
Chapter 3 The ArcPy mapping module |
|
|
129 | (42) |
|
Tutorial 3-1 Accessing map document elements |
|
|
129 | (15) |
|
Tutorial 3-2 Controlling the map extent |
|
|
144 | (14) |
|
Tutorial 3-3 Creating a map series |
|
|
158 | (13) |
|
Chapter 4 Python toolboxes |
|
|
171 | (32) |
|
Tutorial 4-1 Creating a Python toolbox |
|
|
171 | (13) |
|
Tutorial 4-2 Setting up value validation |
|
|
184 | (9) |
|
Tutorial 4-3 Setting up dependencies |
|
|
193 | (10) |
|
|
203 | (54) |
|
Special introduction: Python add-ins |
|
|
204 | (18) |
|
Tutorial 5-1 Creating a Python add-in application |
|
|
222 | (7) |
|
Tutorial 5-2 Using buttons and combo boxes |
|
|
229 | (13) |
|
Tutorial 5-3 Using tools to interact with the map |
|
|
242 | (15) |
Appendix A Using an IDE for Python scripting |
|
257 | (6) |
Appendix B Tool index |
|
263 | (6) |
Appendix C Data source credits |
|
269 | |
David W. Allen is the GIS manager for the City of Euless, Texas. He has taught at Tarrant County College since 1999, where he helped found one of the first GIS degree programs in Texas and establish a state standard for GIS degree programs. He is the author of GIS Tutorial 2: Spatial Analysis Workbook (Esri Press, 2013) and Getting to Know ArcGIS(R) ModelBuilder(TM) (Esri Press, 2011) and the co-author of GIS Tutorial 3: Advanced Workbook (Esri Press, 2011).