Chapter 4. Complex ArcPy Scripts and Generalizing Functions
In this chapter, we will move from creating simple scripts based on autogenerated scripts from ModelBuilder to complex scripts that incorporate advanced Python and ArcPy concepts, such as functions. Functions can improve code and save time when writing scripts. They are also useful when creating modules or other reusable code, allowing for standard programming operations to be scripted and ready for future use.
In this chapter, will cover the following topics:
- Creating functions to avoid repeating code
- Creating helper functions to work with ArcPy limitations
- Generalizing functions to make them reusable