For this week's assignment, we were to write a script that created a text file and write it to the coordinates and OIDs for all of the features within the rivers shapefile that was provided.
Other than the usual setbacks, minor syntax errors and so on, this assignment went well up until the end. When I opened the new .txt file, all of the information was there, however, there weren't new lines for each feature. I messed around with PythonWin trying to figure it out until I ran out of time. Perhaps I kept overlooking something? This was my result in the text file:
Friday, July 11, 2014
Thursday, June 19, 2014
Module 5: Geoprocessing Using Python
This week's assignment familiarized us with running geoprocessing tools in Python. This one went much smoother than last week's, and was pretty enjoyable to work through.
For the assignment, we were to take the hospitals.shp layer from the Data folder and first write a script that added XY coordinates to it. Then we were to create a 1000' buffer on it, and from there, dissolve the buffer into a single feature. It's a little tedious making sure every part of the script is correct, but overall, this one was a fun learning experience. Here are the results of my script:
Friday, June 13, 2014
Module 4: Python Fundamentals Part II
This week's assignment was a rough go. It started out simple enough, in the first two steps we were to import a random module and then find and correct two errors in a loop that was already written.
Then in step 3 we were to create a 'while' loop that added 20 random numbers to a blank list. This is where it got tough. After two days of trial and error and intense reading and rereading, I finally got it. Then it was on to step 4, where we were to write a code that created an unlucky number and removed it from the list. This was also tricky, but not quite as time consuming as step three. This was my final result:
Then in step 3 we were to create a 'while' loop that added 20 random numbers to a blank list. This is where it got tough. After two days of trial and error and intense reading and rereading, I finally got it. Then it was on to step 4, where we were to write a code that created an unlucky number and removed it from the list. This was also tricky, but not quite as time consuming as step three. This was my final result:
Friday, June 6, 2014
GIS Programming Module 3
In this week's lab, the assignment was to write a script using our entire name. It started with a string, and from there we were to split, index, and use math functions to ultimately figure out the number of characters in our last name, multiplied by three.
Although it took me two attempts to get it to work in PythonWin, it was a fairly easy assignment. Here is a screenshot of my finished product:
Although it took me two attempts to get it to work in PythonWin, it was a fairly easy assignment. Here is a screenshot of my finished product:
Friday, May 30, 2014
GIS Programming Module 2
For this week's lab, we first built a model, then created a script tool from the model. Being relatively new to all of this, I found it rather tedious as first, but was able to grasp it fairly reasonably.
Building the model wasn't too bad, the only real obstacle I encountered was the SQL for the Select tool, mainly because I just kept skipping over it. Modifying the script took some time, because just any extra space or capital letter can throw the entire thing off. It just takes extreme diligence.
As tedious as the project was, it was very rewarding and satisfying to finally finish it.
Here is the map that came from running the script in ArcMap:
Building the model wasn't too bad, the only real obstacle I encountered was the SQL for the Select tool, mainly because I just kept skipping over it. Modifying the script took some time, because just any extra space or capital letter can throw the entire thing off. It just takes extreme diligence.
As tedious as the project was, it was very rewarding and satisfying to finally finish it.
Here is the map that came from running the script in ArcMap:
Friday, May 23, 2014
GIS 4102 Module 1
Here's my results from the first dose of script writing for GIS Programming. Pretty much just knocking the rust of all things eDesktop from last semester. This semester seems like it could be pretty challenging, but I'm looking forward to it.
Thursday, May 1, 2014
Subscribe to:
Posts (Atom)





