Posts

Showing posts from June, 2025

Working Geometries Module 6

Image
 This lab worked on creating a search cursor to iterate over shapefile geometries. A nested loop was introduced and used in the code. As well as how to get a text file to print from python. The images below shows The feature ID, vertex ID, X coordinate, Y coordinate, and name of river feature. Flowchart of code:

Exploring & Manipulating Data Module 05

Image
 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. The last screenshot show the dictionary that was populated to show the name and populations of all County Seat cities in New Mexico. 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 ...

Geoprocessing Module 04

Image
This week we worked on creating and modifying scripts within ArcGIS Pro Notebook. The three scripts that were written within notebook performed Add XY Coordinates, Buffer, and Dissolve. The ESRI ArcGIS pages on these were very helpful in the process of writing these codes. Add XY Coordinates The successful script added XY coordinates to the hospital shapefile. When the attribute table was opened the coordinates could be viewed. 1000m Buffer The successful script added a 1000 meter buffer around each hospital point on the map.  Dissolve The successful script dissolved the buffer previously created into a single-feature layer. We were also introduced to ModelBuilder in this module. ModleBuilder takes geoprocessed tools and turns them into flow charts. From this you can also export a Python code that it has written.