Wednesday, May 22, 2024

GIS Programming - Module 1 - Python Environments and Flowcharts

Module 1 for GIS Programming built upon the principles of Python we were introduced to in our reading and lecture content. This consisted of learning the basics of the Python programming language, learning to write pseudocode, create flowcharts, and learning the basics of how Python editors work. This was all very intimidating considering I have no experience in computer programming languages however after completing this lab the intimidation factor has decreased.

We began the module by running a python the Python script file CreateModFolders.py using the IDLE. Running this script resulted in the creation of the folder directory needed that will be used throughout this course. This saved a great amount of time compared to having to create this directory of folders manually.

The second portion of this module consisted of answering our process summary questions which included creating a flowchart that illustrates converting 3 radians to degrees followed by printing the result. The formula provided for this task was as follows:

          degrees = radians*180/pi 

I referred to Chapter 3 in Agarwal et al. to complete this task. Following the examples in the text I first created the pseudocode and then created the flowchart using draw.io since we used it in the examples we completed in our lecture. My results can be seen below.



We concluded the module by reading "The Zen of Python" by Tim Peters and writing a paragraph on what we thought it meant.  My personal thoughts after reading it were that it was apparent that aside from being functional Python code should be written in a manner that is easily interpreted, straight forward as possible, and should be consistent and implicit. I was hearing that the harmony of the language is important otherwise the value and reliability would be greatly diminished becoming difficult for others to utilize. I can appreciate this framework since I have worked in many different occupational fields, with each having their own "language". 

Overall, this was a great introduction and I'm looking forward to building upon the foundation of what I have now learned.



No comments:

Post a Comment

Applications in GIS - Module 6 - Suitability & Least Cost Analysis

In Module 6, we learned about Suitability and Least Cost Path Analysis. We were introduced to performing suitability analysis using both vec...