Chapter 5. ArcPy Cursors – Search, Insert, and Update

Now that we understand how to interact with ArcToolbox tools using ArcPy, and we have also covered using Python to create functions and import modules, we have a basic understanding of how to improve GIS workflows using Python. In this chapter we will cover data cursors and the Data Access module, introduced in 10.1. These data access cursors are a vast improvement on the cursors used in the arcgisscripting module (the precursor to ArcPy) and in earlier versions of ArcPy. Not only can the cursors search data, as we have seen, but they can update data using the Update Cursors and can add new rows of data using the Insert Cursor.

Data cursors are used to access data records contained within data ...

Get ArcPy and ArcGIS – Geospatial Analysis with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.