Working with Geometries for Module 6

For this assignment, we used a search cursor to iterate through the features/rows and an inset for loop to iterate through the points/vertex, to call information from specified fields. Then, we printed the data to a .txt file using the document.write(), shown in the screenshot below.


In order to do this, a .txt had to be created/opened and eventually closed. Also, several functions using an array and index are used to specify the information seen above, which includes the row/OID number, vertex ID, x-coordinate, y-coordinate, and feature name. 

A major challenge I faced with this lab assignment was printing to a file. I had placed my write() statement outside the loop, and it repeatedly printed empty despite any changes I made to it. This was a frustrating reminder of how important organization and indentation is when working with code and writing a functional script. Although the concept of using python for geometries is difficult and will take more practice, it offers many possibilities.

Comments