Exploring & Manipulating Data Module 05
This week's lab worked on using search cursors, lists, and dictionaries. Using a search cursor a dictionary was created and populated the name, feature type, and population of each County Seat city in New Mexico.
The first screenshot below shows that a new file geodatabase(fGDB) was created. As well as a list of all feature classes copied over to the new fGDB.
The next screenshots show the search cursor for the cities feature class that retrieves the Name, Feature Type, and Population.
I had the most trouble with using a for loop to populate the dictionary of all County Seat cities. I used a similar for loop as I did for the search cursor. However by researching and reading, a for loop using the cursor can only be used once in a code. I created a new cursor to be able to populate the dictionary of all County Seat cities.
Flow chart of script.
Comments
Post a Comment