Nair – Week 6

Chapter 7: 

  • This chapter was mainly about debugging and how to fix errors when coding. 
  • I have done this before my computer science classes, and debugging has become an easier task for me now. 
  • I’ve already been taught a lot of the techniques mentioned in the chapter through my professors so I was able to get through this chapter easily.

Chapter 8: 

  • This chapter was about manipulating spatial and tabular data and using concepts learned in past chapters for application. 
  • I also came across the term cursor – a database technology term for accessing a set of records in a table, and its types( search, insert, update) 
  • These functions are essentially used to insert, update, or search things through tables.
  • The Cursor  also has other functions like delete and reset. 
  • The chapter also talks about working with SQL expressions and text and CSV files. 
  • I’m still learning SQL so it took me a while to understand the syntax
  • It is also interesting to learn that a lot of these tools that we used for GIS 191 and 192 are made using Python. 

Nair – Week 5

Chapter 5: 

  • This chapter introduces ArcPy and geoprocessing using Python
  • I began with setting up my workspace which I had done before for GIS 191 
  • The textbook also mentioned detailed changes to the environment like the env size, XY tolerance, etc. 
  • The chapter mentioned that the key to getting the tool to run right is to get the parameters right. 
    • Usually, they are just: input datasets, tool features, and output datasets 
    • Optional parameters are enclosed in {}   
  • I ran the Clip feature using the syntax instructions given in the textbook.    

Chapter 6: 

  •  This chapter was all about exploring spatial data 
  • This chapter introduced some new functions in ArcPy, and also how to perform batch processing more efficiently. 
  • ArcPy has list functions that include: ListFields(), ListIndexes, ListDatasets(), ListWorkspaces(), and ListVersions()
  • I also noticed that some of the function names had been changed in ArcGIS Pro when compared to the textbook.\
  • The chapter also mentioned some built-in functions for lists that were mentioned in Chapter 4 before like len(returns the length of the list), sort(sorts the list), etc. 

Nair – Week 4

 Chapter 3: 

  • The chapter gets started with geoprocessing and how to use it in parallel with the Python Window. 
  • Getting the Geoprocessing pane to open and understanding how it works was easy for me as I’ve used some of the tools for GIS 191
  • I came across three different types of tools: 
    • Built-in tools: Built with compiled programming languages like C++ For example The Clip Tool 
    • Script Tools: Built using scripting languages like Python. For example Mean Center. 
    • Model Tools: Built using models like Model Builder. For example My Model  
  • The dialog box is also something that I’m well acquainted with due to GIS 191
  • I also used a map from one of the GIS 191 databases to try the “Clip” and “Intersect” tools
  • I also came across the Environment Settings in the Analysis Tab, which can be specified for better efficient usage of the tools. 
  • These environment settings can be coded, or used through individual tools as well \
  • I also came across Batch Processing, which is running the same tools multiple times with different parameters. Dynamic naming of the tool’s output datasets must receive special consideration so that a unique name is used for every iteration of the batch tool. Batch tool outputs are dynamically named using the %Name% variable in output parameters.t
  • Batch mode can also take in multiple raster variables and determine multiple statistics in one go 
  • Then I used the Model Builder. I had used this before for GIS 191. Unfortunately, the dataset I was using did not have variables of different kinds, which posed a problem in connecting the shapes, I believe, But I did not fret about it as I had done this before. 
  • For scripting, I noticed that some of the ways, the code for Clip(Analysis Tool) worked had been changed. 
  • I just had to mention the input layers when I used Clip and the output name, and it gave back the perfect result when I ran the code
  • I also saw the Python Code for “Split By Attribute” in the Analysis Toolbox, which was really cool. 

Chapter 4: 

  • The 4th chapter is about learning how Python works and its syntax 
  • This chapter was a bit easy for me because I’ve done Python before and only had to review some stuff to get started 
  • I also came across Unicode (which helps you print out special characters that might not be in English) which I hadn’t before. 

Nair – Week 3

Chapter 1: 

  • The chapter mentions Python as a “scripting language” more than a programming language. Although I’ve seen this word around a lot in the CS Jargon, I haven’t really understood what it meant. The book mentions a clear distinction between the two. 
  • The chapter also has a structure mentioned, as in a brief of what each chapter in the book entails, and that gives me a clear idea of what I’m going to be doing this semester. 
  • It also mentions the advantages of using Python instead of just relying on the tools offered by ArcGIS Pro. 
  • Was a very laid back introduction to  using Python in ArcGIS Pro, and gave me a gist of what I was getting myself into. 

Chapter 2: 

  • I had trouble as soon as I started. The Python Command Line doesn’t work or show the same things as the textbook. I tried to get the Command Line(Prompt) and IDLE started but wasn’t able to. I got the following error, every time I tried to run: 
  • Traceback (most recent call last):
  •   File “<pyshell#4>”, line 1, in <module>
  •     print(numpy._file_)
  • AttributeError: ‘module’ object has no attribute ‘_file_’
  • >>> 

 

  • I think downloading PyCharm might work? Not sure 
  • I got through it! The Python Window in ArcGIS Pro worked in the end and I did not need to download PyCharm as well. 
  • The Python Window can be accessed by: 
    • (Assuming you have a map opened) → View Tab → Python Pane. (It should show up at the bottom) 
  • The second chapter was an introduction to different types of Python IDEs and environments that can be used to go through with the book. Choosing the Python Window would be better in my opinion since there would be no need for extra downloads. 

 

I got through the first chapter in 20 minutes, however it took some time for the second one. But, I think now that I have figured this out, there should not be much trouble.