Tuesday, June 18, 2024

GIS Programming - Module 5 - Exploring & Manipulating Data

 The topic for Module 5 for GIS Programming was exploring and manipulating data. In this module we covered a lot of ground. Some of the major outcomes were learning how to work with different types of cursors to manipulate data, working with list and describe functions, as well as creating and population dictionaries. Another useful topic we covered was how to use search cursors with SQL expressions.

Our task for our lab assignment was to create a script that created and populated a new file geodatabase followed by creating and populating a dictionary containing the names and population of the cities in new Mexico that are county seats.

The initial steps of the task went pretty smooth but I did get hung up when I forgot to update my environment after creating the new file geodatabase. Another thing that gave me some temporary issues was creating my SQL expression in the search cursor. I was able to get through with some help from the exercise document and ESRI documentation and much trial and error. I also I had some issues placing the \n character to create proper space between messages but after more trial and error I was able to things where I wanted them. I finished adding my print statements and GetMessages which gave me a few minor issues but again with trial and error and some tips from the discussion board I was able to get them where I wanted for the most part.

Below are the screenshots of my script output and a flowchart I created to guide myself through the creation of my script.





Overall, this was a really challenging task and I spent a ton of time trying to complete it. There was a lot of trial and error but through the process I can say that I am starting see Python on a more holistic level.








No comments:

Post a Comment

Applications in GIS - Module 6 - Suitability & Least Cost Analysis

In Module 6, we learned about Suitability and Least Cost Path Analysis. We were introduced to performing suitability analysis using both vec...