Ok, I'm stumped! I have a list "xys" that if I do this:
xys.sort()
for i in xys:
print i
I get this: (id, xFrom, yFrom, xTo, yTo)
[225351, 1858897, 889223, 1883031, 882436]
[225396, 1908393, 871758, 1908090, 871791]
[225405, 1899127, 884235, 1885213, 861191]
[225423, 1891186, 878961, 1885811, 881262]
[225435, 1887101, 888042, 1894165, 884325]
[225438, 1888139, 885803, 1888050, 885319]
[225438, 1888139, 885803, 1888081, 884837]
[225441, 1885023, 888542, 1884356, 888364]
[225351, 1858897, 889223, 1883031, 882436]
and then i do this:
for j in xys:
print j
myList = []
myList.append(arcpy.Point(j[1], j[2]))
myList.append(arcpy.Point(j[3], j[4]))
array = arcpy.Array(myList)
polyline = arcpy.Polyline(array)
cursor = arcpy.da.InsertCursor(output, ("SHAPE@"))
cursor.insertRow((polyline,))
print 'inserted row'
I get an empty table... I had this working at one point. Any obvious blunders here?