I have a python script that was creating points in memory and writing them to an arcpy.Array and then writing the array to an already existing feature class as a polyline. When I looked at the line it was missing the first segment and the last 2 1/4 segments. I changed the script to write the points to an existing featureclass (to verify that it was in fact looking at all of the points). All of the points are there but the line is still incomplete.
Here is the code segment:
cur = arcpy.da.InsertCursor(outLineFC, ["SHAPE@"]) cur2 = arcpy.da.InsertCurson(outPointFC, ["SHAPE@"] for coords in coordsList: print coords print coords print float(coords) print float(coords) print "next item" array.add(arcpy.Point(float(coords), float(coords))) cur2.insertRow([arcpy.Point(float(coords), float(coords), ID=int(coords))])) if cur2: del cur2 cur.insertRow([arcpy.Polyline(array)])
Can anyone explain to me why it is writing all of the points in the order I would expect it to draw the line but not writing the first segment and the last 2 1/4 segments of the line?