Posts

GIS5103 Module 6: Working with Geometries

Image
The final Python module is here, Module 6! I forgot how quickly summer semesters can go by, but I'm glad I was able to cover so much ground in Python. It feels like night and day compared to the very first script we handled at the beginning of this course. Now, look at us, we've moved on to working with geometries, where we had to learn about geometry objects and multipart features, as well as reading and writing geometries. Search Cursors came back to play with iterating over the Hawaii rivers shapefile. We had to take the 26 rivers within and create a TXT file that provided each river's name, ID, vertices, and coordinate data (X & Y). I had a nice time working through this one, with minimal hiccups. The first part of the script is always the environment, and setting up my environment is becoming second nature -- I don't think I'll forget to import any necessary modules in the future. The second part of the script required creating a TXT file. This part gave me...

GIS5103 Module 5: Exploring & Manipulating Data

Image
As someone who can be too curious for her own good, I found Module 5 enlightening for my adventurous side, as it covered data exploration and manipulation. We tackled a lot of data description and listing, lists and dictionaries, as well as Search, Update, and Insert Cursors. This module took us to Alaska and New Mexico using shapefiles. Definitely the most intriguing part of this lab for me was manipulating spatial data. As much of the work we do at my job involves updating attributes, I am already itching to automate similar tasks in my workflows, which would save me a lot of headaches and time and reduce human error. This week's script was another free-rein script, where we got to build it from scratch. Although the lab instructions did request us to use certain GetMessage() functions, line structures, and the sort, which was not a huge issue. It reminds me of the many ways you could go about it. Before I even looked at the lab instructions, I tried to build the script based on ...

GIS5103 Module 4: Geoprocessing

Image
It's crazy, but I think I had the biggest "A-ha!" moment this week while scripting in this week's lab. It felt like such a lightbulb moment when I realized I was really comprehending the script as I built it from the ground up. Honestly, over the past couple of weeks, I've been reviewing the scripts we maintain at work, and they make more sense than they did when I was learning Python early in my GIS career. As straightforward and obvious as it is, it's funny how, when you actually dedicate time and focus on something, things begin to fall into place and click oh-so-satisfyingly. This week's module focused on all things geoprocessing! I'm very familiar with the tools specified in this lab, including Clip, Erase, Add XY, and Buffer. It made me feel right at home, which was pleasant. The first half of the lab required us to work in Model Builder, which is integrated in ArcGIS Pro. It's a very user-friendly way to run these geoprocessing and analysis ...

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...

GIS5007 Module 7: Google Earth

Image
It's the final lab module, Module 7: Google Earth! Throughout the lecture, we learned what cartography is heading towards in the future, from 3D aspects of map displays to how the data itself is recorded/collected. The lecture focused on the future of volunteered geographic information (VGI) and its significant role in data collection and representation. VGI is a means of retrieving data from citizens in the community; hence, the name "volunteered geographic information" — people volunteer to share their accounts and provide data on various topics and their spatial relation on the earth. As for the lab, we focused greatly on Google Earth Pro and KMLs. I've had mixed experiences with Google Earth Pro and KMLs. ArcPro didn't let users identify in the "Environment" settings to transfer domain descriptions when running the Layer to KML tool (to my memory, for years). However, since then, they have re-established that feature, which is a relief. Still, Google...