Monday, May 28, 2018

GIS Programming Module 2

This week the lab was focused on writing our own script to run in an attempt to print our last name with the amount of letters multiplied by 3. The following screenshot is the result I came up with without showing the whole script. When I started on the script I was a little unsure where to start off, but once you set a variable the rest flows fairly quickly. I would say most of this lab dealt with a logical flow to represent different numbers and text that the lab asked for. Some of the steps are sort of hidden when only looking at the result. On the screen shot you can only see the printed last name variable and triple count of the letters in the last name. 
The process involved a lot more than it seems. First a string was created with your full name, then a list followed by the names split into first, middle, last. From here you were able to select your last name and get a count that you then multiplied by three. The ending goal in the lab was not to simply make the script print what you want, but to make it universal so that you could simply change the full name in the first variable and the script would adjust and display the correct information for that particular name. It was an interesting lab that showed us a basic interface using python and I can't wait to continue with the scripting!

Monday, May 21, 2018

GIS Programming Module 1

For our first module in GIS Programming we were introduced to Python and scripting in ArcGIS. For this week we learned how to run a previously written script. The script created a foler for the class this semester and organized them into modules for each week and separate folders within each module for Data, Scripts, and Results each week.


The process to actually run the script in the PythonWin program was fairly simple. I chose the method of clicking on the Run button in the menu bar. After clicking on the button a window was opened that asked which script I wanted to run, if I had any arguments to add, and what debugging options I wanted. I confirmed the folder script was selected and the argument and debugging options were left at the default settings. Then a simple click on the “OK” button actually ran the script. After the scrip was run the window simply disappears and the script is still open in the script window.