<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I  increase polyline length in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634238#M35854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case of negative values you could use the polyline::&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;segmentAlongLine (start_measure, end_measure, {use_percentage}). In this case start measure is 0 and end measure is the polyline.length + the negative value and {use_percentage} would be False.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2017 16:05:20 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2017-07-19T16:05:20Z</dc:date>
    <item>
      <title>How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634229#M35845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 20:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634229#M35845</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-18T20:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634230#M35846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if there is a tool that directly addresses this.&amp;nbsp; I know this question has been asked in one form or another on GeoNet and StackExchange, so I encourage a bit more searching.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you up for some basic scripting, the following code snippet should work or get you most of the way there:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; math

fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# Path to feature class containing lines to be extended&lt;/SPAN&gt;
dist_fld &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# Name of field containing distance to extend line&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dist_fld&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dist &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parts &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; part &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getPart&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; part&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; angle &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;atan2&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; pn1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; pn1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Point&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; dist &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cos&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;angle&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; dist &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sin&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;angle&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; part&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parts&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;part&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polyline&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;parts&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SR&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;line&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;dist&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above code simply linearly extrapolates the line that connects the last two vertices of the line.&amp;nbsp; If you want different line fitting/extending, you can implement a different formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; The ArcPy Array slicing on line 11 requires ArcGIS 10.4.1.&amp;nbsp; If you are using an earlier version the line can be modified.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;pn1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arr&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arr&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arr&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634230#M35846</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T02:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634231#M35847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The helpful example provided by&amp;nbsp;&lt;A href="https://community.esri.com/people/bixb0012"&gt;bixb0012&lt;/A&gt;&amp;nbsp;assumes that the line will be extended at the end of the line. A possible scenario could be to extend both ends with half the value from the attribute table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be interesting to learn a little more about why you want this.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Jul 2017 23:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634231#M35847</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-07-18T23:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634232#M35848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought the same thing, about beginning, end, or both, but after reading the question a couple times, I assumed (&lt;EM&gt;I know about assuming&lt;/EM&gt;) we are talking about the end.&amp;nbsp; If the OP states otherwise, I can modify the code snippet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 00:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634232#M35848</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-19T00:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634233#M35849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it will be extended at the end of the line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:43:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634233#M35849</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T12:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634234#M35850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 12:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634234#M35850</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T12:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634235#M35851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you mark the answer posted by Joshua as the correct answer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 13:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634235#M35851</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-07-19T13:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634236#M35852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked fantastically!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 13:17:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634236#M35852</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T13:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634237#M35853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would i deal with negative values? i guess some of the lengths need to be shorter. I hadn't taken that into consideration.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 15:17:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634237#M35853</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T15:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634238#M35854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In case of negative values you could use the polyline::&lt;SPAN style="color: #4d4d4d; background-color: #ffffff;"&gt;segmentAlongLine (start_measure, end_measure, {use_percentage}). In this case start measure is 0 and end measure is the polyline.length + the negative value and {use_percentage} would be False.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 16:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634238#M35854</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-07-19T16:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634239#M35855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The part I haven't tested with &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;segmentAloneLine&lt;/SPAN&gt; is how it handles multi-part lines.&amp;nbsp; My code snippet above treats each part independently, i.e., it extends each part by the specified length (&lt;EM&gt;I know, yet another assumption&lt;/EM&gt;).&amp;nbsp; Does the OP want each part of a multi-part shortened/lengthened or just the last part of the multi-part line?&amp;nbsp; This is where Esri's geometry model (not ST_Geometry) drives me nuts where Polylines are MultilineStrings and Polygons are really MultiPolygons.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 16:18:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634239#M35855</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-19T16:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634240#M35856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/Mr_Kirkwood"&gt;Mr_Kirkwood&lt;/A&gt;‌, how do you want to handle multi-part lines?&amp;nbsp; 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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 16:44:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634240#M35856</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-19T16:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634241#M35857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 17:26:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634241#M35857</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-07-19T17:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634242#M35858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shortened and lengthened of a non-multipart line.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:17:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634242#M35858</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T18:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634243#M35859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just the end of a single non-multipart line needs to be extended or retracted a distance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:18:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634243#M35859</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T18:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634244#M35860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What i mean to say is there is one start &lt;SPAN&gt;vertice&amp;nbsp;&lt;/SPAN&gt;and one end vertice&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634244#M35860</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T18:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634245#M35861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How does that fit into the above code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2017 18:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634245#M35861</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-19T18:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634246#M35862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; math

fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# Path to feature class containing lines to be extended&lt;/SPAN&gt;
dist_fld &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# Name of field containing distance to extend line&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dist_fld&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dist &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cur&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SR &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; dist &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parts &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; part &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getPart&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pn &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; part&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; angle &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;atan2&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; pn1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; pn1&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Point&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;X &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; dist &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;cos&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;angle&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Y &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; dist &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sin&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;angle&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; part&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;p&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; parts&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;part&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Polyline&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;parts&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; SR&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; line &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;segmentAlongLine&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; line&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; dist&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;line&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;dist&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:58:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634246#M35862</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T02:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634247#M35863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much! This has saved me a lot of time. I am using Oil and Gas data (points) for horizontal wells. The data comes from the Wyoming Oil and Gas Commission. There is a top hole location and bottom hole location. The bottom hole locations are not always correct. So we have to pick the bottom bases on Electric Logs of the subsurface and determine what formation the well was completed in. So, the bottom hole location changes, maybe deeper or shallower. So the point moves. This way is a lot quicker to take the 2 points create a line and recalculate the &amp;nbsp;length based on the new data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 13:07:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634247#M35863</guid>
      <dc:creator>RobertKirkwood</dc:creator>
      <dc:date>2017-07-20T13:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I  increase polyline length</title>
      <link>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634248#M35864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for posting back. I do wonder if in your case you really don't need any Z values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 18:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-do-i-increase-polyline-length/m-p/634248#M35864</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2017-07-20T18:43:32Z</dc:date>
    </item>
  </channel>
</rss>

