Posts

Showing posts from June, 2022

GIS 5103 LAB 6

Image
  For the final lab of the course, the objectives included using Spyder to list and describe rasters, using raster objects in geoprocessing, map algebra in operators, and defining raster tool parameters with classes. The end goal was to create a script for a raster detailing specific forest landcover, slope and aspect profiles by copying a script which was coded on Spyder. My script began by importing arcpy and setting the environment's workspace. I needed to create a new geodatabase using the arcpy.CreateFileGDB_management which is where my raster was saved. Part of the script involved checking for the Spatial Analyst module extension, using the arpy.CheckOutExtension and an if statement. The remaining code was in block form following the if statement, after the SA module checks out, and included creating an outraster for the elevation and the percent rise, and saving the outraster in the results folder. I then used the ReMapValue function to assign the appropriate classifications...

GIS 5103 LAB 5

Image
  Objectives for this lab included using Python script to create a new TXT file, and write data to the TXT file to include the names of the rivers in Hawaii, along with their X,Y vertices and OID. Additionally, another requirement was creating psuedocode. The method of doing so was to first set the environment, and open a text file. By opening a text file, the file is also created if it has not yet been created. A search cursor is created to parse through the feature classes fields including the object ID (OID) number, shape and name. Afterwards, a vertex ID is created and assigned to the OID. Finally, the text is written using the f.(write) which references the txt file created in the beginning of the script. The txt is checked for accuracy, and the rows and cursor are deleted, and the text file is closed.  My experience with this script was extremely challenging. This was by far the most difficult module in experience, however, learning how to create and manipulate text file...

GIS 5103 LAB 4

Image
  The objective for this week's lab were to work with search cursors, lists and dictionaries, check for, describe and list data, demonstrate correct usage of update/search/insert cursors, validate table and field names and design a logical model of a script using a flowchart (see below). I struggled with the final steps of the label, designing search cursors to create an empty dictionaries for the population of cities listed as County Seats. Ultimately, I completed the lab and am happy with how everything turned out.