<?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: Connect polyline endpoints between features in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570532#M3846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done with a very simple model (if you have the Advanced license, which you do not state). The model is shown below with the final result (green polyline)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2435" alt="Capture.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/2435_Capture.PNG" style="width: 620px; height: 453px;" /&gt;&lt;/P&gt;&lt;P&gt;The only assumption is that the order of the polylines in the shapefile dictates the order of the extracted nodes which is the order the vertices are in your green line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2014 16:21:19 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2014-07-22T16:21:19Z</dc:date>
    <item>
      <title>Connect polyline endpoints between features</title>
      <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570529#M3843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure how best to word this.&amp;nbsp; I am looking for &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;arcpy&lt;/STRONG&gt;&lt;/SPAN&gt; solutions/ideas on connecting the endpoints of stacked polyine features together in order to build it into a polygon feature class. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This task done manually is quite simple: just add a new polyline(s) from one start point to the startpoint of the polyline below it and continue this until an entire "side" of the stacked polylines are connected.&amp;nbsp; Then it's just a matter of doing this same thing to the other "side" on the endpoints of each polyline feature.&amp;nbsp; See:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="stackedpolylines.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/2392_stackedpolylines.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 15:11:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570529#M3843</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2014-07-22T15:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Connect polyline endpoints between features</title>
      <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570530#M3844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So in your example you are trying to create that green polyline, in this case it is compose of only 3 vertices?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK several questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;are your blue polylines whose end vertices you are trying to connect always stacked precisely one above each other, i.e. their X coordinates are always the same?&lt;/LI&gt;&lt;LI&gt;Which line do you start from, the very top or the bottom?&lt;/LI&gt;&lt;LI&gt;Are these bunches of lines all over the place in a single datasets or is it a bunch per shapefile? &lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 15:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570530#M3844</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-07-22T15:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Connect polyline endpoints between features</title>
      <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570531#M3845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Yes, I would like to create the green line you see between each feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Yes, always stacked one above the other.&lt;/P&gt;&lt;P&gt;2. Doesn't matter really.&amp;nbsp; The next step would simply run this polyline FC thru a ToPolygon conversion.&lt;/P&gt;&lt;P&gt;3. Each "set" of polylines is a single feature class.&amp;nbsp; The 3 polylines you see in the image is 1 FC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 16:01:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570531#M3845</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2014-07-22T16:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Connect polyline endpoints between features</title>
      <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570532#M3846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be done with a very simple model (if you have the Advanced license, which you do not state). The model is shown below with the final result (green polyline)&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2435" alt="Capture.PNG" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/2435_Capture.PNG" style="width: 620px; height: 453px;" /&gt;&lt;/P&gt;&lt;P&gt;The only assumption is that the order of the polylines in the shapefile dictates the order of the extracted nodes which is the order the vertices are in your green line.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 16:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570532#M3846</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-07-22T16:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connect polyline endpoints between features</title>
      <link>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570533#M3847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I really am unintersted in model builder and need to implement this into a Python Add-In.&amp;nbsp; Here's what I came up with that works just fine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

 ptarrL = arcpy.Array()
ptarrR = arcpy.Array()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for l in listoflayers:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for lyr in arcpy.mapping.ListLayers(mxd):
&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; if lyr.name == str(l):
&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; print "layer: " + str(lyr.name)
&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; with arcpy.da.SearchCursor(lyr, ["SHAPE@"]) as lyrCur:
&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; for row in lyrCur:
&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; xL, yL = row[0].firstPoint.X,&amp;nbsp; row[0].firstPoint.Y
&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; xR, yR = row[0].lastPoint.X, row[0].lastPoint.Y
&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; ptarrL.add(arcpy.Point(xL, yL))
&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; ptarrR.add(arcpy.Point(xR, yR))


&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; with arcpy.da.InsertCursor(lyr, ["SHAPE@"]) as inscur:
&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; polyline = arcpy.Polyline(ptarrL)
&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; inscur.insertRow([polyline])
&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; with arcpy.da.InsertCursor(lyr, ["SHAPE@"]) as inscur:
&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; polyline = arcpy.Polyline(ptarrR)
&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; inscur.insertRow([polyline])&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; del inscur, lyrCur

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/connect-polyline-endpoints-between-features/m-p/570533#M3847</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2021-12-12T00:33:20Z</dc:date>
    </item>
  </channel>
</rss>

