Posts

Showing posts from June, 2025

GIS5103 - Module 6 - Working With Geometries.

Image
                          For Module 6, we were tasked with the following objectives: • Create a search cursor to iterate over shapefile geometries. • Demonstrate the ability to write vertices of a geometry to a text file. • Contrast the different objects using in parsing over geometries within a script.                         I had the hardest part of writing this script was writing the nested loop part due to indentation. I had the problem where it was only generating 5 lines of code instead of the 247 lines of code needed to complete the assignment. I had to learn to fix the indentation so the for loop would be nested inside the initial for loop. I also learned to use the .strip line which removes  all leading and trailing whitespace from the string line. My pseudocode is below, which helped me understand it better after writing the co...

GIS5103 - Module 5 - Exploring & Manipulating Data

Image
                     Module 5 had us creating new geodatabase, work with search cursors, lists, and dictionaries. For my code, I initially imported arcpy and os, then set the workspace environment and set the overwrite output to true. Next, I created a new geodatabase, listed all the feature class within the data folder, then I copied all the feature classes within the inital data folder into my new geodatabase, and then updated the code to use my new geodatabase. Then I created a search cursor to look for county seat cities with their name and population numbers. Finally, I created a dictionary with these county seats cities and their associated population amount.                      I had the hardest problem with selecting with what row # to use for inside the []. A lot of trial errors but Serenity Meads answer on the discussion board helped me finalize the cod...

GIS5103 - Module 4 - Geoprocessing

Image
                     For this week's lab, we learned to use Model Builder and geoprocessing tools in scripts. The Model Builder was very similar to the flowchart we had been making, but it had more functions that allowed us to basically make a script using visual methods. The first assignment of the module made us clip all soil layers to a basin shapefile, then select all soils that were classified as "Not prime farmland" using an SQL query, and then erase the not prime farmland from the basin polygon. I thought it was very intuitive to build code this way. You don't necessarily have to write the code line by line, but just interact with the ModelBuilder flowchart interface.                     For the second part of the assignment, we were assigned to add XY coordinates to a shapefile, then create a 1000-meter buffer around this feature, and finally dissolve the buffe...