Question: Lab 12 work submit via Assignment 10 submission link. This assignment is optional. Practice using search and update cursors. Write a script that copies 'park.shp'

Lab 12 work submit via Assignment 10 submission link. This assignment is optional. Practice using search and update cursors. Write a script that copies 'park.shp' from the data file you downloaded to your scratch folder and then does each of the tasks in a-c for the file in 'scratch'. Since the table and FID values are hard-coded, this script takes no arguments. Find the specified rows using the where_clause parameter. (a) Using a search cursor, find the row with an FID value of 45 and print the COVER field value in that row. Printed output: Row with FID = 45 has cover orch (b) Using an update cursor, find the row with an FID value of 120 and change the cover name to park. Printed output: Row with FID = 120 has been updated to use cover: park (c) Using an update cursor, find the row with an FID value of 22 and delete it. Note that when you delete a row, it updates the FIDs so that there will be a new entry with the FID of 22 even after successful deletion. To confirm that the row was deleted, call the Get Count (Data Management) tool before and after deleting this row and print the before and after counts. Printed output: Count before deletion: 426 Count after deletion: 425

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!