Update ID.

2604
3
02-20-2016 03:11 AM
RajP
by
New Contributor

Hello,

I would like to update the LineID from Start to End line continuously using Python script. Kindly have a look of image.Err.png

Error.png

Regards,

Raj P

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

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.

0 Kudos
DanPatterson_Retired
MVP Emeritus

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

0 Kudos