Friday, July 26, 2013

Module 10 - Creating Custom Tools
GIS 4102
 
 
This week I learned about creating custom tools from python scripts.  This by far was the most interesting module that I have done.  This module seemed to tie everything together for me and allowed me to understand how I can use these scripts in my workplace.  The above screenshot is of the tool dialog box that I created by defining parameters.  This will allow the user of my tool to type in the data they wish to manipulate, as well as define where that information is stored.  This MultiClip script will allow the user to specify a single feature as the clip boundary, and then select multiple features to clip from.  All of the results are then saved to the Results folder with a unique name that is generated by the tool based off of the clip feature and the feature being clipped.
 

 
 
The above screen shot is the results of a successful run of the tool once the script was modified from its original format.  Here we can see in the Process Summary box messages that the scripts author wanted the user to see.
 
Overall, I enjoyed this module and can't wait to use it in my place of employment.


Thursday, July 25, 2013

Participation #2
 GIS 4102

NFL KICKOFF TO YOUTH FOOTBALL ANALYSIS
 
From 2001 to 2006 youth football in the US increased significantly in regards to participation.  This drew the attention of the National Football League (NFL).  The NFL teamed up with USA Football and the National Recreation and Parks Association (NRPA) to conduct a study identifying the reasons for the increased participation as well as where the NFL could focus funds for improvement.

A technical team was formed to conduct the study utilizing ArcGIS.  Several software tools and programs were used following the Geo-Referenced Amenities Standards Process (GRASP).  The parks and recreation industry has utilized this methodology for many years to gather, manage, analyze, and present information.

Nationwide surveys were conducted and the data was compiled.  A primary database was created from these surveys to be analyzed utilizing GIS.  Due to the large study area, the technical team decided to utilize ESRI’s “StreetMap USA” as a basemap.  To generate reports, tables, and analytic results, the team utilized Python.  Python allowed the team to automate the data processing for this large-scale project with ease.

With the matrix of data that was created, collected, and analyzed through GIS, the NFL will be able to better assess where monies and materials will be best utilized.

Source:  http://www.esri.com/news/arcnews/summer08articles/nfl-puts-gis.html

Wednesday, July 24, 2013

Module 9 - Debugging and Error Handling
GIS 4102
 
This weeks assignment we worked on debugging existing scripts and error handling.  In the above screenshot you will see the results of a script that was originally given to me in with multiple errors.  I was tasked to correct the script and the errors that I found to produce the results you see.  This lab was a bit more challenging for me.  the status bar and error reporting in the interactive window was a huge help in isolating and fixing the errors.

 
In the above screenshot I was again asked to troubleshoot a script that was given to me.  Here I found that several of the errors were found simply by reading through the script and finding misspelled words as well as simple code errors.  I did utilize the debugger tool, but found most of my errors when I ran the program and read the error report in the interactive window.
 
It took a while for me to read through the script and understand exactly what it was trying to do.  I still feel I need to get a better understanding of for loops as well as if then statements. Perhaps a bit more reading and continual use will help me in the process. 


Monday, July 15, 2013

Module 7 - Geometries and Rasters
GIS 4102
 
 
 
PART 1.
 
The above screenshot contains a notepad text file.  It was created using Python and the use of a nested "for" loop.  Using a SearchCursor I was able to identify a polyline object and then using the nested "for" loop extract the information I needed from the feature object.  The arrays within the feature contained multiple points or vertices that are identified above.  Each point has it's coordinates (X, Y) values shown as well as the NAME field from the rivers shapefile that was used.

 
 
PART 2.
 
The above screenshot shows the final result of a raster tiff file that was created working with the elevation and landcover raster files.  Utilizing Spatial Analysis I was able to modify the Forest landcover raster and identify Slopes between 5 and 20 degrees, as well as Aspects between 150 and 270 degrees.  Once all these variables were isolated and identified I utilized a map algebra operator (Boolean "And" function) to classify the combined rasters.  The final raster image is shown above.
 
This module was very robust and covered a lot of data that dealt with nested loops as well as spatial analysis of raster files.  I enjoyed the challenge of this assignment.
 



Tuesday, July 2, 2013

Module 6: Working Spatial Data

Week 7 - Module 6 - Working Spatial Data
GIS 4102
 

 
 
In this weeks module, we were focusing on working with spatial data.  There was a lot to cover, and it was enjoyable learning about functionality available in Python to accomplish different tasks. I discovered how to utilize lists, tuples, directories, as well as different cursors to manipulate and show data to the end user. 
 
The above screenshot was the results of the script I have written.  This script creates a Geodatabase named JBG16.  It then copies all the shapefiles from the Data directory into the newly created GeoDatabase.  Once copied the cities feature class is searched using a search cursor that gathers and populates a directory named countySeats with the NAME and POP_2000 values. Finally, those results are then printed for the user.
 
Overall, this was the most challenging of all the projects I have done.  I ran into a syntax error that kept me busy for a while, but ultimately was able to discover the problem through script troubleshooting.  Who knew the addition of the letter s at the end of a value could keep me busy for over an hour...



Monday, June 24, 2013

Week 5/6 - Python GeoProcessing
GIS 4102
 
Week 5 - Review
 
Week 6 - Module 5 - Python GeoProcessing
 
This week we worked with Python Script and Geoprocessing.  The screenshot above was taken after a series of code was run to Add XY Coordinates to the hospitals shapefile, then create a 1000 meter buffer around the hospital locations, and finally Dissolve the buffers created into a single feature.  All three of these tasks were completed using python script.  The results were then printed in the interactive window to show that the tools completed their parameters successfully.
 
I can see how a python code can be written to complete routine series of tasks and all that would need to be modified is a few parameters.  I also discovered that using code that was previously written saves both time and cuts down on syntax errors.
 
Overall I definitely am coming away with something that I can use in my current position, and look forward to further growth in Python Script.


Monday, June 10, 2013

Week 4 - Participation 1
GIS 4102
 
GIS can be used in a number of different ways.  The Town of Mooresville, North Carolina utilized GIS to assist them with a stinky situation.  In 2010 the town discovered they were having a problem with an increasing number of overflows and stoppages in their Sanitary Sewer System.

The Mooresville Water/Sewer Maintenance Department (WSMD) reached out to their Engineering Department for a solution to meet the requirement set by the North Carolina Department of Environment and Natural Resources.  This requirement involved the cataloging of the cleaning and maintenance of all sewer lines on a regular basis to identify troubled areas.  Cataloging their findings in Excel spreadsheets, the WSMD logged the cleaning data for the entire month and dates for when the sewer features were cleaned.  They gave each manhole a unique identifier to associate it with a matching manhole on the GIS map.

Then utilizing Python scripting, they were able to simplify the repetition of the steps required to create the cleaning data.  Python script was made available to all ArcGIS users to do analysis on the data which allowed them to determine the number of sewer mains cleaned as well as the total lengths.

The analytical data that was collected was then used to determine “hot spots” that were cleaned seven or more times in the previous year.  This allowed the WSMD staff to work with other departments to isolate and monitor locations that were repeatedly cleaned.  Overall the WSMD saw an increase in productivity by 26% and a decrease of stoppages in gravity main lines throughout town.  This in turn, through the use of technology and teamwork, has saved the WSMD money as well as cut down on overtime.

Town Shapens Proactive Sewer System Management
By Alan Saine, Civil Engineer, Town of Mooresville, North Carolina
ArcNews Fall 2012