Wow! what a fun but quick class packed with good arcpy information.
As you may have guessed this is the last lab assignment and post for GIS5103, GIS Programming. The lab was somewhat challenging because of my familiarity with the OGC Simple Feature Access - Part 1: Common Architecture. They share some similarity but the OGC model sure has more Geometry types then arcpy. Then you look at something like LocationTech's JTS (Java Topology Suite) it has more similarities to arcpy's data structures except no GeometryFactory in arcpy but rather than an Array (arcpy), JTS has a CoordinateSequence.
Nonetheless, it pays to read the documentation, as the SearchCursor contains an argument called explode_to_points
. When this argument is True
the SearchCursor will "inflate" the geometry returning a row for each point found in the geometry. With this single boolean argument their is no need for nested loops, you can write the features verties to a file with just one single loop.
No comments:
Post a Comment