<?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 to merge (union) features using Python in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413664#M1381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Julie6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to merge 2 streams in same feature class, not merging 2 feature classes. The step could be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. find the 2 streams that connect to each other (I know how to do this)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. create a new feature using the geometry of the 2 stream by merging them together&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. delete the 2 streams.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 May 2011 17:43:15 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2011-05-03T17:43:15Z</dc:date>
    <item>
      <title>How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413661#M1378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Julie6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to find the equivalent function as ArcObject's TopologicalOperator.Union in Python to merge 2 features into one. How to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Julie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 16:19:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413661#M1378</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-03T16:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413662#M1379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the workflow for the operation? Are the features to be merged in the same feature class or different feature classes? Normally with geoprocessing you'd select (or create a feature layer from) the features to be merged and run a Union and then depending on the purpose, a Dissolve. Both of these steps create new feature classes instead of modifying the input feature class(es), which may or may not be desirable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need to work at a finer grained level than that you, and you need to do it in Python, I believe you would have to either &lt;/SPAN&gt;&lt;A href="http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python"&gt;use ArcObjects in Python&lt;/A&gt;&lt;SPAN&gt; or manipulate the geometry directly at the coordinate level using a lot of math or a 3rd party Python module such as &lt;/SPAN&gt;&lt;A href="http://pypi.python.org/pypi/Shapely"&gt;Shapely&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 16:52:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413662#M1379</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-05-03T16:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413663#M1380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure if you simply want to "merge" the geometry (either the Merge or Append tools), or actually overlay geometry via an actual overlay operation (the Union tool, or perhaps Intersect? - depending on what you are trying to do).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For the union though, the syntax in Python would be something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.Union_analysis(input1FC + ";" + input2FC, outputFC, "ONLY_FID", "1 FEET", "GAPS")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 17:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413663#M1380</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-03T17:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413664#M1381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Julie6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to merge 2 streams in same feature class, not merging 2 feature classes. The step could be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. find the 2 streams that connect to each other (I know how to do this)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. create a new feature using the geometry of the 2 stream by merging them together&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. delete the 2 streams.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 17:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413664#M1381</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-03T17:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413665#M1382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could use either &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Dissolve/00170000005n000000/"&gt;Dissolve_management&lt;/A&gt;&lt;SPAN&gt; or &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000040000000.htm"&gt;UnsplitLine_management&lt;/A&gt;&lt;SPAN&gt; to do this if creating intermediate/derived data is acceptable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could even use &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000036000000.htm"&gt;DeleteFeatures_management&lt;/A&gt;&lt;SPAN&gt; to delete the original two features and &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000050000000.htm"&gt;Append_management&lt;/A&gt;&lt;SPAN&gt; to append the dissolved feature back into the original feature class, though intermediate data would still be created.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 18:02:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413665#M1382</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-05-03T18:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413666#M1383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Julie6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, that is the tool I need.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But there is one problem, I don't want to Unsplit all the connect stream, only some that fall to a certain category. I thought I would be able to loop through the features and if I find the 2 streams that need to merge, I'll just merge the stream and delete the 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But both Dissolve and Unsplit are taking a feature layer, so do I have to export the streams that need to be merged to a separate layer, unsplit then insert them back?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 18:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413666#M1383</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-03T18:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413667#M1384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If they operate like most geoprocessing tools they should only operate on the selected features, but if not, Make Feature Layer should work. A feature layer is not a permanent copy of the data, just an snapshot or "view" of some subset of the original data. The Unsplit tool will create a new output feature class consisting of the dissolved features, however. You could then delete the features that were selected and append in the dissolved features.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 May 2011 19:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413667#M1384</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-05-03T19:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413668#M1385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Julie6&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will give it a try. Thank you very much for the quick response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 13:07:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413668#M1385</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-04T13:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to merge (union) features using Python</title>
      <link>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413669#M1386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could probably also do this (merge two features into one) using an update cursor.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 15:28:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/how-to-merge-union-features-using-python/m-p/413669#M1386</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-05-04T15:28:47Z</dc:date>
    </item>
  </channel>
</rss>

