Posts

Showing posts from June, 2023

Module 6 GIS Programming: Working with Geometries

Image
 Hello all, in the final week of GIS Programming we learned how to work with geometric data from ArcGIS in Python. This included each level of geometric data, from features and arrays down to just point and coordinate data. We also practiced writing data to a text file and using the nested for loops to reach different levels of data. The getPart method was used in particular to skip a loop and retrieve the coordinate data for the rivers.  I've included a small text file section where I printed the OID, vertex ID, x,y coordinates, and the feature's name (from left to right).      The assignment was very logical and did not create too many problems for me. I need to remember to close the text file at the end so that the processes will actually occur and write to the text file. I've included a flowchart of the logic of my script below: Thank you,     Joel Sexson

Module 5 GIS Programming: Explore and Manipulate Data

Image
 Hello all, in the 5th week of GIS Programming we learned how to deal with data. As the title of the module states, we explored data using things like describe functions and search cursors, and we manipulated data by learning about insert/update cursors and how to create different data (such as creating a file geodatabase or a dictionary).      The assignment was to create a script that made a new file geodatabase, copied over feature classes from one folder to the geodatabase, and then populated a dictionary using data from a search cursor done on the cities layer in the fGDB.      Below is a picture of the flowchart of my script:       The results of the script are shown above. There are print statements throughout the script to explain what processes were happening and when they were completed. The only problem that I ran into with the script actually helped me learn how to determine if my script is working the way I want it to i...

Module 4 GIS Programming: Geoprocessing

Image
        Hello all, the fourth week of GIS Programming (4102/5103) was an introduction to running geoprocessing tools using ModelBuilder in ArcGIS and a main focus on using Python scripts to run geoprocesses. The first thing to learn about using Python for GIS is to import arcpy and set your workspace to begin the code. Some main things to watch out for when using GIS tools in Python are things such as allowing outputs to be overwritten, using the correct syntax for the tools, making sure data exists, and assigning features to variables in the script. These can allow for the scripts to run smoother and without errors.      The first part of this assignment included using the Clip, Select, and Erase tools in ArcGIS using a ModelBuilder. The logic of the model was relatively simple and could erase the selected soil areas that were not prime for farming.      The second part of the assignment asked for the use of the AddXY, Buffer,...