Quantcast
Channel: Question and Answer » arcpy
Viewing all articles
Browse latest Browse all 767

Editing (particularly flipping direction of) a polyline obtained through an UpdateCursor

$
0
0

I want to flip the direction of a polyline feature obtained as a result of an Update query; e.g.

lines= arcpy.UpdateCursor(myFeatureClass,myQuery)
dsc= arcpy.Describe(myFeatureClass)
try:
    for ln in lines:
        # ? Check number of parts
        # ? Flip direction of each, or some of the parts
        lines.updateRow(ln)
except:
    print "Error:", sys.exc_info()[0]
finally:
    # releasing locks
    if lines: del lines
    if ln: del ln

BTW, any better way to know how many rows are returned than counting them?


Viewing all articles
Browse latest Browse all 767

Trending Articles