-
Book Overview & Buying
-
Table Of Contents
Programming ArcGIS with Python Cookbook, Second Edition
By :
By default, SearchCursor will contain all rows in a table or feature class. However, in many cases, you will want to restrict the number of rows returned by some sort of criteria. Applying a filter through the use of a where clause limits the records returned.
By default, all rows from a table or feature class will be returned when you create a SearchCursor object. However, in many cases, you will want to restrict the records returned. You can do this by creating a query and passing it as a where clause parameter when calling the SearchCursor() function. In this recipe, you'll build on the script you created in the previous recipe by adding a where clause that restricts the records returned.
Follow these steps to apply a filter to a SearchCursor object that restricts the rows returned from a table or feature class:
Open IDLE and load the SearchCursor.py script that you created in the previous recipe.
Update the SearchCursor() function...
Change the font size
Change margin width
Change background colour