<?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 Is there an ArcPy method to merge polylines within the same layer? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520006#M22839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way using ArcPy to merge features selected from the same layer into a new feature, exactly as the Edit &amp;gt; Merge tool does it?&amp;nbsp; I want to script this, because several dozen merges need to be done on a series of feature selections (iterating through a list of saved SQL expressions).&amp;nbsp; I looked, but could not find.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working in ArcGIS Pro 2.0, but I also have ArcGIS Desktop 10.6 available.&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jul 2018 22:44:11 GMT</pubDate>
    <dc:creator>GuyBeels</dc:creator>
    <dc:date>2018-07-03T22:44:11Z</dc:date>
    <item>
      <title>Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520006#M22839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way using ArcPy to merge features selected from the same layer into a new feature, exactly as the Edit &amp;gt; Merge tool does it?&amp;nbsp; I want to script this, because several dozen merges need to be done on a series of feature selections (iterating through a list of saved SQL expressions).&amp;nbsp; I looked, but could not find.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working in ArcGIS Pro 2.0, but I also have ArcGIS Desktop 10.6 available.&amp;nbsp; Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2018 22:44:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520006#M22839</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-03T22:44:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520007#M22840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try to steer you toward creating a new&amp;nbsp;field and populating it by an ID that you can use to either merge together or leave alone, then use Dissolve to make your new feature class. Selections are very slow through Arcpy. An alternative would be to&amp;nbsp;loop through your features using an &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/updatecursor-class.htm"&gt;UpdateCursor&lt;/A&gt;&amp;nbsp;and&amp;nbsp;use the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/classes/polyline.htm"&gt;Polyline&lt;/A&gt; union method to make your new geometries (one feature at a time), but this would be quite a bit more complicated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2018 22:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520007#M22840</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2018-07-03T22:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520008#M22841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to the attribution scheme I used, that would be really complicated.&amp;nbsp; (But thanks - your reply was much appreciated, I'm likely to use it at some point.)&amp;nbsp; My workaround, to be scripted, is to iterate this:&amp;nbsp; 1) select by attributes (over a list of stored expressions), 2) make layer from selected features, 3) export the layer to a feature class, 4) select all from the feature class, and 5) dissolve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 00:15:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520008#M22841</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-04T00:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520009#M22842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sharing with &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌ and &lt;A href="https://community.esri.com/space/2051"&gt;Analysis&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 14:46:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520009#M22842</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-07-04T14:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520010#M22843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is possible, but how do you want to handle the merge?&amp;nbsp; For example, if you have multiple features selected, do you want the lowest OID feature to become the new merged feature and the other features gets deleted, or do you want a new merged feature created (new OID) and all the old features removed?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 14:48:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520010#M22843</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-07-04T14:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520011#M22844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joshua, the &lt;EM&gt;Dissolve&lt;/EM&gt; will create a very simple output feature class (single feature with just 3 or 4 attributes, one of them being an initially &amp;lt;Null&amp;gt; name field to be populated as the last step in the loop).&amp;nbsp; Nothing from the source dataset will be disturbed.&amp;nbsp; After the iterations, all of the identically structured one-feature output feature classes will be &lt;EM&gt;Merge&lt;/EM&gt;d into a single one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 20:48:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520011#M22844</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-04T20:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520012#M22845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In your original post you mention merge, now you are talking dissolve.&amp;nbsp; Do you want to modify the original data set like Edit &amp;gt; Merge does or create a new data set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 21:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520012#M22845</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-07-04T21:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520013#M22846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create a new dataset.&amp;nbsp; I've given up on trying to find the kind of Merge I want in ArcPy.&amp;nbsp; I can make my flow work with Dissolve - with a few more steps than I think should be necessary, but that's life.&amp;nbsp; Darren's earlier response put Dissolve in my head, and I made that flow work in a testbed project.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 21:26:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520013#M22846</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-04T21:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520014#M22847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am fairly certain it can be done in-place, like Edit &amp;gt; Merge, but how the code is structured depends on the answers to the questions I originally asked about how you want to handle merged features in the original data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 21:37:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520014#M22847</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-07-04T21:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520015#M22848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Edit &amp;gt; Merge&lt;/EM&gt; does work fine for what I want to do, &lt;EM&gt;using New Feature&lt;/EM&gt; option to leave existing features alone - but only manually.&amp;nbsp; I can find no ArcPy function (the original question) for this.&amp;nbsp; And doing this many times manually is no way to spend an evening.&amp;nbsp; (Mine, anyway.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 21:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520015#M22848</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-04T21:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520016#M22849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To clarify, I designed a flow that would create &lt;EM&gt;no&lt;/EM&gt; merged features in the original dataset - and for this I actually like Dissolve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2018 23:33:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520016#M22849</guid>
      <dc:creator>GuyBeels</dc:creator>
      <dc:date>2018-07-04T23:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520017#M22850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua, I am very much interested in how you would apply the merge functionality using arcpy. To answer your question, I would like to merge to the lowest OID feature. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 15:51:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520017#M22850</guid>
      <dc:creator>JohnGaiot</dc:creator>
      <dc:date>2019-06-24T15:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520018#M22851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From earlier comments, it seems you have 3 or 4 attributes (not sure if you are including the spatial attribute in those numbers).&amp;nbsp; What does your table/feature class structure look like, and how to you want to handle the merge?&amp;nbsp; If there are integer fields, do you want so sum them, keep the value from the lowest OID, etc...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520018#M22851</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-06-24T17:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an ArcPy method to merge polylines within the same layer?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520019#M22852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically I'd like to keep all the attributes from the record with the lowest OID. I am dealing with a large scale watercourse dataset that has hundreds of small gaps in the original capture. Most of them are within 4 metres, and so by performing a Near Analysis on the from and to nodes of the dangles, I can create a line feature class from the From-XY and To-XY attributes to connect them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the merging part has me perplexed...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-arcpy-method-to-merge-polylines-within/m-p/520019#M22852</guid>
      <dc:creator>JohnGaiot</dc:creator>
      <dc:date>2019-06-24T17:28:06Z</dc:date>
    </item>
  </channel>
</rss>

