Lab 6 [GIS5103]: Working with Geometries
The screenshot above shows the output from this week's lab where skills emphasizing working with geometry objects were addressed. In the output above these skills were used to read a shapefile and then write specific information on each feature to a text file. The items on each line in the output file included the object ID number, vertex count number, X coordinate, Y coordinate, and feature name. The general pseudocode was as follows: Start Step 0: (Setup) Setup input filepath Setup output filepath Step 1: (Prepare output file) Create output filename Open output file for writing Step 2: (Write details to output file) Create search cursor to extract OID@, SHAPE@, NAME for each feature Iterate through each row/feature in cursor Set vertexID to 0 Iterate through the points in each feature (using getPart) Increment vertexID by 1 (starts count at 1 for each set of vertices)