The purpose of this lab was to create a nested loop using the search cursor function. In this script I created a text file for my information to be printed into. I set my fields in the search cursor to OID@, which will get the features object ID, SHAPE@, this will get the xy coordinates for each vertex in the multipart feature, and the "NAME" field.
for the row i had to get the vertex for each row. i set the vertexid = 0,
for the point in row i used the getPart(0) function to get the vertex for each multpart feature, the set the vertex to add 1 to have the vertex id to increase with each new vertex. then I had the output in the txt file to print the OID, vertexid, x and y coordinates, and the NAME field for each vertex.
I enjoyed this lab this week. I feel like I learned a lot throughout this course but I still have a lot to learn when it comes to scripting. I'm happy to use what I have learned as a foundation for my scripting journey.


No comments:
Post a Comment