Greetings all,
And just like that, this half-semester is about over. Welcome to module 6, working with geometry processes. The goals here are to explore the geometry objects associated with point, line, polygon, single and multipart features. The end deliverable and goal of the module was to create a search cursor which iterates over a river based shapefile. It then writes the associated vertex location information into a text file. It does this by utilizing a nested for loop.
Below is a pseudo code representation of the process:
Start
Import Modules
arcpy, fileinput,
string, OS, env
Define workspace.
Create SearchCursor for “OID”, “SHAPE@”,
“NAME” within desired feature class.
Create or Identify text file for writing
results too.
Utilize for loop to iterate
through each row in cursor
Define VertexID for
sequential vertices processing
Utilize nested for loop to
iterate through each point in row.
getPart() to iterate
through each object.
Add +1 to previous point
in row to continue iteration..
Write SearchCursor output to the
text file.
Close text file.
Delete Row
Delete Cursor
End
The above shows the flow of the script. Note it doesnt include things like print statements designed to highlight script process. Another thing it doesnt do well is show the nested nature of the for loops. However, this is overcome with the flowchart below.
No comments:
Post a Comment