Posts

Showing posts from May, 2026

GIS5103 Module 3: Debug & Error Handling

Image
Switching from the heat to the onslaught of rain recently has made me sick again—you could say I've caught a... bug! Speaking of catching a bug, aside from the common cold I've been experiencing, we learned about common Python and geoprocessing errors, as well as general debugging and error handling in Python scripts this week. Troubleshooting can be headache-inducing, but at the same time, oh so rewarding when you can overcome them. Python thankfully makes this process as painless as possible. Again, I'm reminded of how kind Python and its editors can be in identifying what causes a script to fail to run or to break in the midst of a run. This week, we were tasked with three different pre-made scripts this time. For two of the scripts, we were able to fix some errors and ensure they ran. The final and third script, however, required us to use try-except statements to bypass erroneous sections of Part A while still allowing Part B to run. Script 1 - Feature Class Field Name...

GIS5103 Module 2: Python Fundamentals

Image
Putting the "fun" in fundamentals -- it's Module 2: Python Fundamentals! This week, we were given the rundown, a Python bootcamp, so to speak. We were taught everything from values and variables, lists, tuples, indexes, and loops (for and while) to Booleans and so on. Honestly, I often get stuck on the fundamentals when it comes to understanding and working with Python. I tend to get a fair grasp of it, but I find myself frozen trying to make things from a blank slate. Module 2, however, had a great balance between getting more comfortable working with an existing framework and making scripts from scratch. Overall, I feel like my foundational understanding of Python has been strengthened, and so has my confidence. Module 2's lab was broken up into 4 parts. Part 1 covered lists and indexing. Part 2 covered troubleshooting and correcting 2 errors in a dice game randomizer. Part 3 required a loop to generate 20 random numbers between 0 to 10. And Part 4 required another ...

GIS5103 Module 1: Python Environments & Flowcharts

Image
With summer on the horizon, so is the next semester of classes. I'm coming back to my next GIS course on GIS Programming. I will admit programming has always seemed daunting to me, despite my colleagues reassuring me that Python is one that I can easily pick up. As one with a beginner's level in Python, I hope to prove them right by the end of this course! For Module 1, we focused on Python Environments and Flowcharts. The textbook and lecture introduced what Python is, various Python editors, and flowcharting. I, for one, didn't know that Python was named after the comedy group Monty Python, not after the snake, which is funny. A cool factoid indeed! As for Python, it's known to be simple, easy, and free/open-source, which gives users greater accessibility than other programming languages. I thought it was an awesome and effective way for us to see a Python script and how to run it using the CreateModFolder script. Also, it ensures that the students' folder organiz...