I would like to update the LineID from Start to End line continuously using Python script. Kindly have a look of image.
union/merge the polylines so it forms one polyline
split at vertices. Only works for segments joined at vertices without intervening nodes
Or you will have to get the pieces into a list, then (in this case), sort the polylines lexicographically (sort by X coordinates), then reassemble in that order.
Or start with the leftmost polyline, flip if necessary so that it points East, and find the next segment that shares the end node, flip if necessary, then merge the two segments... repeat with the remaining polyline segments.
Essentially, the latter is a spanning tree amongst start and endpoints, while retaining the connecting polyline.
38517 - Create sequential numbers in a field using Python in the Field Calculator
Sadly, that doesn't change the order of the geometry, upon which the ID numbers are based. The geometry objects need to be changed first
Retrieving data ...