Tuesday, May 21, 2024

GIS 5103 Module 1 - Intro to Python / Flowcharting


 Module 1 of GIS Programming was an introduction to the Python scripting language, which we will be utilizing this semester to automate geoprocessing tasks to make the workflow more efficient. The exercise and lab assignment for this module focused on opening the Integrated Development Environments [or IDE's], familiarizing ourselves with the interface, writing a couple one-line scripts, and importing / running a script that was written by another person. I was able to follow this code line-by-line with a moderate understanding of what was taking place, but the syntax of this language is completely new to me. Ultimately, the script created a file system on our personal S: drive for our files / data to be saved to throughout the remainder of the semester. It was really neat to just run a program that created all of these folders instantaneously. Manually, this process would have taken at least a few minutes opposed to the second it took to run the script. This was an excellent illustration of how Python scripts can be used to automate redundant and time-intensive tasks. 

The second half of this module's lab assignment was to create a flowchart of a script that would convert [3] radians to degrees and print the output. We did not actually write the code, but the process we would undertake if we were to write it in Python. Essentially, we used conventional symbology to begin / end the script [ovals are used for termination processes], define the variables such as radians [3] and Pi [3.14159] [rectangles are used for assignment and computational processes], print the output of the calculation [parallelograms are used for input / output processes], and terminate the script [oval shape again]. The flowchart for this script can be viewed in the picture above. 

I am highly excited to dive deeper into the Python programming language and use it to create a more efficient and streamlined workflow in ArcGIS. 

No comments:

Post a Comment

GIS 5935 Module 2.2 - Surface Interpolation

  Post in progress - please check back soon...