Posts

Showing posts from June, 2019

Module 6: Working with Geometries

Image
The purpose of this week's lab was to explore the geometries of a shapefile by writing vertices to a text file. The final script created a new TXT file, used a search cursor to iterate over the rivers shapefile geometries with  for loops, and then writing data to the new TXT file. The final TXT file contains the following data from the rivers.shp : feature OID, vertex ID (created in the script), x & y coordinates, and the name of the feature. Below is a screen shot of part of the data in the new TXT file (the full TXT file is not shown as it is very long and contains 0-25 features with a total of 247 vertices). One of the things that made creating and running this script easy was the use of geometry tokens, specifically OID@ and SHAPE@. Geometry tokens are pieces of code that allow us to interact and access specific information about the geometry of features, which saves time when working with large datasets and/or features with a lot of geometry information. The ...

About Me

My name is Angelique Hennon. I have a BS in Biology from the University of Central Florida in Orlando, FL. I am currently the senior biologist for an environmental consulting company in central Florida. We have offices in Florida and Wyoming, so sometimes, in addition to wild Florida, I get to work in beautiful places out west. This is my second semester in the online GIS certificate program at the University of West Florida. I am pursing a GIS certificate to advance my career and enhance our company's GIS capabilities. In addition to work and school, I am a mom of a joyful little boy who I completely adore. In between being a biologist, student, wife and mom, I enjoy running, particularly trails, and am currently training for my first marathon.  Here the link to my story map with a little more information about me:  https://arcg.is/1HaPzy  (Links to an external site.) Links to an external site. .

Module 5: Exploring & Manipulating Data

Image
The purpose of this lab was to explore spatial data with scripting using search cursors, lists and dictionaries. A template script was provided and modified in the Spyder IDE to perform the required functions. The final script creates a new geodatabase called ath22, copies 8 feature classes into the geodatabase, queries the feature class cities for the names and population sizes within the county seat and creates and populates a dictionary called county_seats with names and population size circa 2000 of every 'County Seat' city in New Mexico. Included in the script output are processing messages indicating which process is running, that the process was completed and how long it took to complete the process. The first tasks of the script created a new file geodatabase called ath22 and copy 8 feature classes into the geodatabase. The code for this part of the script was easy to create. To print the messages with spaces so they are easier to read, it is useful to add '\n...

Module 4: Geoprocessing

Image
The purpose of this week's lab was to design a model in ModelBuilder in ArcGIS Pro and use Python 3 to create a script to perform multiple geoprocessing tasks. For the first part of the assignment, I used ArcGIS Pro created a model in ModelBuilder called SoilErase. The model clipped all soils to the extent of the basin, selected all soils classified as "Not prime farmland" and erased the "Not prime farmland" from the basin polygon. Three geoprocessing tools were added to the model: Clip, Select and Erase. When successfully run, the model produced the following shapefile: For the second part of the assignment, I used Spyder IDE to create a script to perform 3 geoprocessing tasks on a hospitals shapefile. Before writing the script, I found it useful to visualize the tools with their inputs and outputs by first creating the model in ModelBuilder. For the script, I included code to import the arcpy modules and set the workspace to the Data folder. The 3 geop...

Module 3: Debugging and Error Handling

Image
The purpose of this lab was to implement debugging procedures, interpret script error messages, fix syntax and other errors, and modify scripts to run with exceptions. There were three scripts with errors that required debugging. The first script was supposed to print out the names of all fields in a shapefile attribute table (parks.shp), but three errors had to be corrected before it would run correctly. All three errors were Syntax error s. Spyder marks some errors in the script code with an orange exclamation point before the line containing the error. In this script the errors were in Lines 12, 14, and 15. One error was a capitalization  error and the other two were misspellings. After correcting these Syntax errors, the script ran successfully as shown below in the IPthyon console output:  The second script was supposed to print out the names of all the layers in an ArcGIS Pro project, but several errors had to be corrected before it would run correctly. Becau...