AnsweredAssumed Answered

Points to polylines missing first segment and last 2 segments

Question asked by litterals on Dec 3, 2014
Latest reply on Dec 3, 2014 by curtvprice

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[0]
     print coords[1]
     print float(coords[2])
     print float(coords[3])
     print "next item"

     array.add(arcpy.Point(float(coords[3]), float(coords[2])))
     cur2.insertRow([arcpy.Point(float(coords[3]), float(coords[2]), ID=int(coords[1]))]))
if cur2:
     del cur2


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?