What this book covers
Chapter 1, Introduction to Python for ArcGIS, offers a quick introduction to the basics of Python, including other uses for the programming language. It covers Python data types and important modules used throughout the book.
Chapter 2, Configuring the Python Environment, is an introduction to how Python works: its folder structure, executables, and modules. It also explains importing modules into scripts, the built-in modules, and covers Integrated Development Environments (IDEs), which are powerful programming aids.
Chapter 3, Creating the First Python Script, demonstrates how to use ArcGIS ModelBuilder to model the first analysis and then export it as a Python script. String manipulations and how to use file paths in Python are also introduced.
Chapter 4, Complex ArcPy Scripts and Generalizing Functions, examines how to perform analyses and produce outputs that are not possible using ModelBuilder. By using functions, or reusable code blocks, repeating code is avoided.
Chapter 5, ArcPy Cursors – Search, Insert, and Update, covers ArcPy data access cursors and how they are used to search, update, or insert records in feature classes and tables. It explains the quirks of iterating using cursors, and how to only select or update the records of interest.
Chapter 6, Working with ArcPy Geometry Objects, explores ArcPy Geometry objects and how they are combined with cursors to perform spatial analysis. It demonstrates how to buffer, clip, reproject, and more using the data cursors and the Arcpy geometry types without using ArcToolbox.
Chapter 7, Creating a Script Tool, explains how to make scripts into tools that appear in ArcToolbox and are dynamic in nature. It explains how the tools and scripts communicate and how to set up the ArcTool dialog to correctly pass parameters to the script.
Chapter 8, Introduction to ArcPy.Mapping, explores the powerful Arcpy.Mapping module and how to fix broken layer links, turn layers on and off, and dynamically adjust titles and text. It shows how to create dynamic map output based on a geospatial analysis.
Chapter 9, More ArcPy.Mapping Techniques, introduces Layer objects, and their methods and properties. It demonstrates how to control map scales and extents for data frames, and covers automated map export.
Chapter 10, Advanced Geometry Object Methods, expands on the ArcPy Geometry object methods and properties. It also explains how to create a module to save code for reuse in subsequent scripts, and demonstrates how to create Excel spreadsheets containing results from a geospatial analysis.
Chapter 11, Network Analyst and Spatial Analyst with ArcPy, introduces the basics of using ArcPy for advanced geospatial analysis using the ArcGIS for Desktop Network Analyst and Spatial Analyst Extensions.
Chapter 12, The End of the Beginning, covers other important topics that need to be understood to have a full grasp of ArcPy. These topics include the Environment Settings, XY values and Z and M resolutions, Spatial Reference Systems (Projections), the Describe functions, and more.