How do I increase polyline length

4669
23
Jump to solution
07-18-2017 01:21 PM
RobertKirkwood
Occasional Contributor III

I have 250 polylines. I have a value i calculated (all different) that needs to be added to the length of the. The values are in the attribute table. How can I increase the length of the lines using the values in the table as the distance to add to the lines? 

Tags (1)
0 Kudos
23 Replies
JoshuaBixby
MVP Esteemed Contributor

Mr_Kirkwood‌, how do you want to handle multi-part lines?  Do you want each part to be extended/shortened or just the "last" part, what "last" means in the context of a multi-part line?

XanderBakker
Esri Esteemed Contributor

The problem with multi-part lines, is that the parts not necessarily will be in a proper order. The "assumption" (here we go again) that the last part is the actual end part of the line, is not necessarily true and parts do not have to be connected or share the same direction. In this case the sample script will also apply the distance for each part and not as a total (distance from attribute divided by part count). Maybe for the sake of simplicity it would be good to assume single parts? And yes, when you apply segmentAlongLine on an illogically ordered multi-part line feature, you will obtain strange results...

RobertKirkwood
Occasional Contributor III

Just the end of a single non-multipart line needs to be extended or retracted a distance

0 Kudos
RobertKirkwood
Occasional Contributor III

What i mean to say is there is one start vertice and one end vertice 

0 Kudos