Module 7- Exploring & Manipulating Spatial Data

This week we will learn how to read, update, and manipulate data using lists, dictionaries, cursors, and loops.

The lab itself was well designed in breaking down all steps necessary which consisted of the following tasks.:

  • Create a new Geodatabase.
  • Set a current workspace which includes Data output folder.
  • Created variable fclist to get a list of all feature classes in the data set.
  • Created a for loop to copy over all features from the workspace to the new Geodatabase.
  • Created a Search Cursor for cities layer filtering city names and populations that met the criteria.
  • Created an empty dictionary and populated it with cities and their populations using a for loop.
  • Added "Process complete!" messages to each step as validation that a step had been completed.

Below is the output for all steps completed.


The most difficult step was creating a for loop for the last requirement in order to populate the dictionary. I was going down the wrong path for a while after having assigned variables to row [0] and row [1]. Then figured out that the variable assignment placement was the issue. After that, the loop worked as intended. 

While we started out using a template script, there was no scripting to work off from. In retrospect, I've learned how important Pseudocode is to this process. Below is a diagram model of what was done.



Comments

Popular posts from this blog

Module 6- Proportional Bivariate

Module 4- Color Choropleth

GIS5100 Week10: Final Project