I have a rather massive point data table for animal locations. I need to represent the individual animal movements as vectors, with an arrow at every node on the resultant polyline. We've created the polylines from the point data, but I'm rather stumped at to how to get a directional arrow at each node (or midpoint). Changing to a cartographic line only results in an arrowhead at the end of each polyline, and I can't figure out how to automatically divide each polyline into node-to-node segments.
Any ideas? Split Line at Vertices tool or Network Analyst aren't options.
Thanks in advance
I see this thread is quite old and I don't know that the da module existed at the time, but here's how you can currently tackle this problem with Python, if you're so inclined:
>>> lines = 'lines_dw'
... sr = arcpy.Describe(lines).spatialReference
... points = {}
... PID = 0
... with arcpy.da.SearchCursor(lines,'SHAPE@',spatial_reference=sr) as cursor:
... for row in cursor:
... for part in row[0]:
... for i in range(len(part)):
... if not part.equals(row[0].lastPoint):
... PID += 1
... dx = part.X - part[i+1].X
... dy = part.Y - part[i+1].Y
... if dx > 0 and dy >= 0:
... angle = math.fabs(math.degrees(math.atan(dx/dy))) + 180
... if dx <= 0 and dy > 0:
... angle = math.fabs(math.degrees(math.atan(dy/dx))) + 90
... if dx >= 0 and dy < 0:
... angle = math.fabs(math.degrees(math.atan(dy/dx))) + 270
... if dx < 0 and dy <= 0:
... angle = math.degrees(math.atan(dx/dy))
... points[PID] = [part,angle]
... points_list = [arcpy.PointGeometry(v[0]) for k,v in points.iteritems()]
... arcpy.CopyFeatures_management(points_list,r'in_memory\points')
... arcpy.AddField_management('points','ANGLE',"DOUBLE")
... with arcpy.da.UpdateCursor("points",['OID@','ANGLE']) as cursor:
... for row in cursor:
... row[1] = points[row[0]][1]
... cursor.updateRow(row)