<?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: Dissolve with arcpy.da.UpdateCursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356751#M28079</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "extra" comma in my code wasn't extra, it was purposeful to allow for list/sequence unpacking.&amp;nbsp; Removing the comma changed the shape variable from a geometry object to a list, hence the error message.&amp;nbsp; Try re-running the code as is and see if it works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2015 11:49:35 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2015-09-22T11:49:35Z</dc:date>
    <item>
      <title>Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356737#M28065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, can anyone give me some guidance as to how (or if it is possible) to use arcpy.da.updatecursor to loop through multiple polylines and dissolve them one by one ? (Im on Win7, arcgis 10.2.1, Python 2.7 and the data is in an Oracle 11g sde db)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem I have is numerous layers that I am trying to automate removal of self overlaps but that needs to occur by objectid not by layer and I also dont want to create another dataset from the one being updated so maybe need to start an edit session first??.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While Im not a wizard at this (or I may have been able to resolve it by now), I do understand enough to be able to adjust the code below to do some other maintenance functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # The "if (row[1] or 0) == 0: " code: "row[1] or 0" will return either the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # value of the outputField, or if that value is None (null), then it will return 0...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputField = "SEVENTH_ID"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outputField = "ELEVENTH_ID"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = "REGION_46"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields = [inputField, outputField]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc, fields) as cursor:&lt;/P&gt;&lt;P&gt;&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 cursor:&lt;/P&gt;&lt;P&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; if (row[1] or 0) == 0:&lt;/P&gt;&lt;P&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; row[1] = row[0]&lt;/P&gt;&lt;P&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; cursor.updateRow(row)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del cursor, row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think what I am trying to do would look something like;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Dissolve the self overlaps by row for REGION_46&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # If the current row has no self overlaps, move onto the next row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inputField = "OBJECTID"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc = "REGION_46"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fields = [inputField]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(fc, fields) as cursor:&lt;/P&gt;&lt;P&gt;&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 cursor:&lt;/P&gt;&lt;P&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; if (row[0] has self overlaps, use "DISSOLVE" to eliminate them &lt;/P&gt;&lt;P&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; cursor.updateRow(row) then move onto the next row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del cursor, row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone successfully acjieved this previously or can give me some useful guidance?&lt;/P&gt;&lt;P&gt;(Noting I have read the help menu and other resources numerous times and not been successful)&lt;/P&gt;&lt;P&gt;Cheers, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Sep 2015 22:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356737#M28065</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-13T22:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356738#M28066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this something you'll need to do more than once? A &lt;A href="http://desktop.arcgis.com/en/desktop/latest/manage-data/topologies/an-overview-of-topology-in-arcgis.htm"&gt;topology &lt;/A&gt;may be the better route.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 13:07:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356738#M28066</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-09-14T13:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356739#M28067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide an real-world example, or illustrative example, of a polyline and what the expected outcome would be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, this is a case where the weaknesses of the ArcPy Geometry classes really show throw.&amp;nbsp; Other Python geometry libraries/packages like &lt;A href="http://geodjango.org/"&gt;GeoDjango &lt;/A&gt;and &lt;A href="https://github.com/Toblerity/Shapely"&gt;Shapely &lt;/A&gt;offer more functionality at the geometry level.&amp;nbsp; For example, ArcPy Geometry classes don't offer a simple/is_simple functionality to tell whether a linestring is simple or complex, which would be helpful in this case at determining whether a line either crosses or overlaps itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I may be able to offer additional feedback if I have a specific example to work with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Sep 2015 20:06:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356739#M28067</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-09-14T20:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356740#M28068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks @&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; &lt;/SPAN&gt;&lt;A _jive_internal="true" data-avatarid="6150" data-externalid="" data-online="false" data-presence="null" data-userid="16710" data-username="wwmiller68" href="https://community.esri.com/people/wwmiller68" style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: inherit;"&gt;Wes Miller&lt;/A&gt;, Coincidentally the fc is a line topolgy. &lt;/P&gt;&lt;P&gt;I have run 'export topology errors' and can see which lines have overlap by joining the original and export tables so now I want to loop through the original lines by objectid to dissolve each lines errors.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 01:30:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356740#M28068</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-15T01:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356741#M28069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnaks @&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; &lt;/SPAN&gt;&lt;A _jive_internal="true" data-avatarid="1637" data-externalid="" data-online="false" data-presence="null" data-userid="3420" data-username="bixb0012" href="https://community.esri.com/people/bixb0012" style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: inherit;"&gt;Joshua Bixby&lt;/A&gt;, Im not sure how to provide an example so let me expalin long hand.&lt;/P&gt;&lt;P&gt;I have a line which has several self overlaps on it where the previous operator has snapped 'back and forth' at times.&lt;/P&gt;&lt;P&gt;I want to take the line and dissolve all the self overlaps of that line without either doing the dissolve by layer or creating a new fc or layer.&lt;/P&gt;&lt;P&gt;Each of my dat sets has many lines within and objectid is the field i want to individually dissolve by. hth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 01:36:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356741#M28069</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-15T01:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356742#M28070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load the feature class in question, select 1 of the problem features using the ArcMap GUI, and then run the following code in the interactive Python window:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14423269683781687 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14423269683781687"&gt;&lt;P&gt;&lt;SPAN style="color: #004da8;"&gt;print&lt;/SPAN&gt; next(arcpy.da.SearchCursor(&lt;EM&gt;fc&lt;/EM&gt;, "SHAPE@"))[0].WKT&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace &lt;EM&gt;fc&lt;/EM&gt; with the name of the feature class/layer with the selected feature.&amp;nbsp; This should print out the WKT representation of the feature, which can be used to recreate the feature for testing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Sep 2015 14:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356742#M28070</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-09-15T14:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356743#M28071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt; some sample lines below to demonstrate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OBJECTID 1 has self ovelap and I want to dissolve it (and go to next OBJECTID)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;OBJECTID 1 MULTILINESTRING ((9700614.7831249982 4432945.8557500001, 9700614.7831249982 4427945.8557500001, 9700614.7831249982 4428945.8557500001))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OBJECTID 2 has self ovelap and I want to dissolve it (and go to next OBJECTID)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;OBJECTID 2 MULTILINESTRING ((9702086.5310000032 4431846.6370000001, 9702086.5308749974 4427846.6367499996, 9702086.5308749974 4428846.6367499996))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OBJECTID 3 has &lt;STRONG&gt;NO&lt;/STRONG&gt; self ovelap so no requirement to dissolve it (skip and go to next OBJECTID)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;OBJECTID 3 MULTILINESTRING ((9703086.5310000032 4431846.6370000001, 9703086.5308749974 4427846.6367499996, 9704269.3477500007 4427852.6163749993))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of my fcs has more than 2000 OBJECTIDs that have self overlap and I want to dissolve them individually by OBJECTID. (and from my research perhaps arcpy.da.updatecursor is the way to go as it could cycle through the OBJECTIDs ??)&amp;nbsp; Cheers, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 00:54:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356743#M28071</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-16T00:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356744#M28072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for providing the WKT representations, quite helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick, or not so quick, aside before moving on.&amp;nbsp; When talking about valid geometries and spatial relationships, the nuance and complexity of the topics are often lost or oversimplified in conversation.&amp;nbsp; There are very specific definitions, and sometimes there are disagreements or discrepancies between different groups/companies/organizations when it comes to the meaning and implementation of those definitions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the examples provided in the context of ArcPy Geometry classes:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; #OBJECTID 1
&amp;gt;&amp;gt;&amp;gt; l1 = arcpy.FromWKT('MULTILINESTRING((9700614.7831249982 4432945.8557500001,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9700614.7831249982 4427945.8557500001,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9700614.7831249982 4428945.8557500001))')
...&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;gt;&amp;gt;&amp;gt; l1.overlaps(l1)
False
&amp;gt;&amp;gt;&amp;gt; l1.crosses(l1)
False
&amp;gt;&amp;gt;&amp;gt; l1.touches(l1)
False
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 2
&amp;gt;&amp;gt;&amp;gt; l2 = arcpy.FromWKT('MULTILINESTRING((9702086.5310000032 4431846.6370000001,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9702086.5308749974 4428846.6367499996,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9702086.5308749974 4428846.6367499996))')
...&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;gt;&amp;gt;&amp;gt; l2.overlaps(l2)
False
&amp;gt;&amp;gt;&amp;gt; l2.crosses(l2)
False
&amp;gt;&amp;gt;&amp;gt; l2.touches(l2)
False
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 3
&amp;gt;&amp;gt;&amp;gt; l3 = arcpy.FromWKT('MULTILINESTRING((9703086.5310000032 4431846.6370000001,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9703086.5308749974 4427846.6367499996,'
...&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '9704269.3477500007 4427852.6163749993))')
...&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;gt;&amp;gt;&amp;gt; l3.overlaps(l2)
False
&amp;gt;&amp;gt;&amp;gt; l3.crosses(l3)
False
&amp;gt;&amp;gt;&amp;gt; l3.touches(l3)
False
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From one set of definitions, the examples don't overlap, cross, or even touch themselves, which makes it fairly difficult to identify the geometries that "self overlap."&amp;nbsp; The ArcPy Geometry classes, unfortunately, do not have a self-overlap method or anything similar.&amp;nbsp; For the Python implementations (Shapely, GeoDjango) of JTS/GEOS, the closest approximation to a self-overlap method for lines is is_simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; from shapely import wkt
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 1
&amp;gt;&amp;gt;&amp;gt; _l1 = wkt.loads('MULTILINESTRING((9700614.7831249982 4432945.8557500001,'
...&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;&amp;nbsp;&amp;nbsp; '9700614.7831249982 4427945.8557500001,'
...&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;&amp;nbsp;&amp;nbsp; '9700614.7831249982 4428945.8557500001))')
...&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;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; _l1.is_simple
False
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 2
&amp;gt;&amp;gt;&amp;gt; _l2 = wkt.loads('MULTILINESTRING((9702086.5310000032 4431846.6370000001,'
...&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;&amp;nbsp; '9702086.5308749974 4428846.6367499996,'
...&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;&amp;nbsp; '9702086.5308749974 4428846.6367499996))')
...&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;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; _l2.is_simple
True
&amp;gt;&amp;gt;&amp;gt; 
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 3
&amp;gt;&amp;gt;&amp;gt; l3 = wkt.loads('MULTILINESTRING((9703086.5310000032 4431846.6370000001,'
...&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;&amp;nbsp; '9703086.5308749974 4427846.6367499996,'
...&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;&amp;nbsp; '9704269.3477500007 4427852.6163749993))')
...&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;&amp;nbsp; 
&amp;gt;&amp;gt;&amp;gt; _l3.is_simple
True
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While it is clear that OBJECTID 1 is not simple because it "self overlaps," or folds back onto itself, it is less clear why OBJECTID 2 is simple.&amp;nbsp; Since JTS/GEOS libraries are OGC compliant, consecutive equal vertices are allowed in a LineString.&amp;nbsp; A basic simplify operation will remove not only redundant vertices but also some intermediate vertices if not necessary to the topology of the line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; _lc = wkt.loads('LINESTRING(0 0, 1 0, 1 0, 2 0, 2 0, 3 0, 3 0, 3 0)')
&amp;gt;&amp;gt;&amp;gt; _lc.is_simple
True
&amp;gt;&amp;gt;&amp;gt; _lc.simplify(0).wkt
'LINESTRING (0 0, 3 0)'
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of continuing this already-too-long comment, I will wrap us this aside and post another comment with additional thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; OBJECTID 2 in my code above is not the same as OBJECTID 2 provided by OP.&amp;nbsp; I must have miscopied the WKT representation of OBJECTID 2 and created a line with duplicate end points.&amp;nbsp; Instead of correcting OBJECTID 2, I will leave it as is to discuss the situation when a line has consecutive vertices that are equal.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356744#M28072</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T16:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356745#M28073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I alluded to in my previous comment, identifying the lines with "self overlaps" is not easy using the ArcPy Geometry classes.&amp;nbsp; One could, if so inclined, write his/her own Shamos-Hoey or Bentley–Ottmann algorithm to identify self-intersections with lines, but it might just be easier at that point to convert ArcPy geometry objects over to Shapely or GeoDjango geometry objects and run an is_simple test on them.&amp;nbsp; Another option could be generating a list of problem lines first, using Esri topology tools for example, and then using that list to only process lines that you know have issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't say it will work in all situations, but one approach worth looking into is using the &lt;SPAN style="font-family: courier new,courier;"&gt;union()&lt;/SPAN&gt; method of the ArcPy Geometry class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; #OBJECTID 1
&amp;gt;&amp;gt;&amp;gt; l1.length
6000.0
&amp;gt;&amp;gt;&amp;gt; l1u = l1.union(l1)
&amp;gt;&amp;gt;&amp;gt; l1u.length
5000.0
&amp;gt;&amp;gt;&amp;gt; l1u.WKT
u'MULTILINESTRING ((9700614.7830810547 4427945.8558959961, '
&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; '9700614.7830810547 4428945.8558959961,'
&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; '9700614.7830810547 4432945.8558959961))'
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 2
&amp;gt;&amp;gt;&amp;gt; l2.length
3000.0002500005094
&amp;gt;&amp;gt;&amp;gt; l2u = l2.union(l2)
&amp;gt;&amp;gt;&amp;gt; l2u.length
3000.0001831054788
&amp;gt;&amp;gt;&amp;gt; l2u.WKT
u'MULTILINESTRING ((9702086.5311279297 4431846.6370849609,'
&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; '9702086.5308837891 4428846.6369018555))'
&amp;gt;&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&amp;gt; #OBJECTID 3
&amp;gt;&amp;gt;&amp;gt; l3.length
5182.8322396370995
&amp;gt;&amp;gt;&amp;gt; l3u = l3.union(l3)
&amp;gt;&amp;gt;&amp;gt; l3u.length
5182.832314284238
&amp;gt;&amp;gt;&amp;gt; l3u.WKT
u'MULTILINESTRING ((9703086.5311279297 4431846.6370849609,'
&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; '9703086.5308837891 4427846.6369018555,'
&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; '9704269.3479003906 4427852.6165161133))'
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see, the union() method of the ArcPy Geometry class does some amount of geometry validating when it creates a new geometry.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For OBJECTID 1, the line was cleaned up by reordering the vertices so the line no longer folded back onto itself.&lt;/LI&gt;&lt;LI&gt;For OBJECTID 2, the duplicate vertex was simply removed.&lt;/LI&gt;&lt;LI&gt;For OBJECTID 3, the union operation effectively recreated the original line.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356745#M28073</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T16:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356746#M28074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the comprehensive and concise response Joshua. &lt;A _jive_internal="true" data-avatarid="1637" data-externalid="" data-online="false" data-presence="null" data-userid="3420" data-username="bixb0012" href="https://community.esri.com/people/bixb0012" style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: inherit;"&gt;Joshua Bixby&lt;/A&gt;&lt;/P&gt;&lt;P&gt;While I hear what you are saying, let's not get hung up on "valid geometries and spatial relationships etc etc"&lt;/P&gt;&lt;P&gt;Suffice to say I can open the fc attribute table and manually select each row and run the stock Dissolve tool and achieve the precise desired outcome. What I dont want to do is spend the last 6 years of my working life doing that when I suspect there are more efficient methods out there that users can point me to.&lt;/P&gt;&lt;P&gt;So to my original question, and in light of your findings with Union, "can anyone give me some guidance as to how (or if it is possible) to use arcpy.da.updatecursor to loop through multiple polylines and dissolve (or UNION) them one by one? (addendum, I want to use this in a stand alone Python script) Cheers, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 22:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356746#M28074</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-17T22:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356747#M28075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well Joshua has effectively given you the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not implement something like this :&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;with arcpy.da.UpdateCursor(fc, ["SHAPE@"]) as Cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in Cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; origGeom = row[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = origGeom.union(origGeom)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cur.updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356747#M28075</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2021-12-11T16:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356748#M28076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response Neil. Unfortunately I still dont have a clear handle on the process.&lt;/P&gt;&lt;P&gt;My code has fc set and returns the fc value to the screen with 'print'.&lt;/P&gt;&lt;P&gt;My fc has values in it including polylines whihc self overlap by way of returning back on themselves.&lt;/P&gt;&lt;P&gt;If I add the code above I get an error mesaage in my log which says;&lt;/P&gt;&lt;P&gt;'NoneType' object has no attribute 'union'&lt;/P&gt;&lt;P&gt;In my limited experience I have received that message in other situations but due to there being no value. Have I misinterperated this? Cheers, Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Sep 2015 23:30:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356748#M28076</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-20T23:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356749#M28077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your error message indicates that the cursor is returning a None object for a shape, which happens when there is a NULL record or empty geometry in the feature class.&amp;nbsp; To avoid the error, just check a geometry object exists before trying to union it.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;with arcpy.da.UpdateCursor(fc, ["SHAPE@"]) as cur: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for shape, in cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if shape:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape = shape.union(shape)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur.updateRow(shape)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356749#M28077</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T16:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356750#M28078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;​ Thanks again Joshua. I tried the code above but received an error message " 'list' object has no attribute 'union' ". (There is also a small typo (a comma) but I saw that and removed it)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took your comments on board and re-ran your code from the day before after manually removing the NULLs from my fc and that code then ran successfully and resolved the overlaps very nicely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, while I do have code that would loop through the fc and remove NULLs, there is other data in fileds that I need to keep and above all else i am trying not to create new data sets for a bunch of business reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies in advance for what may then be a beginners question, but should I be concatenating the 2 lots of code together or is one intended to replace the other?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2015 22:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356750#M28078</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-21T22:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356751#M28079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "extra" comma in my code wasn't extra, it was purposeful to allow for list/sequence unpacking.&amp;nbsp; Removing the comma changed the shape variable from a geometry object to a list, hence the error message.&amp;nbsp; Try re-running the code as is and see if it works for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 11:49:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356751#M28079</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-09-22T11:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356752#M28080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does the Repair Geometry geoprocessing tool not do the job for you?&lt;/P&gt;&lt;P&gt;The Data Interoperability extension can also repair geometries in place and has fine grained control over handling various issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:00:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356752#M28080</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2015-09-22T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356753#M28081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check/Repair Geometry won't do anything for most of these cases, at least the examples provided, since they are valid geometries.&amp;nbsp; A line that folds back onto itself isn't simple but it is valid, unless you are using SQL Server where Microsoft is the oddball with how they deal with these types of cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A quick example using the Check Geometry tool:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; SR = arcpy.SpatialReference(26915)
&amp;gt;&amp;gt;&amp;gt; ln = arcpy.FromWKT('LINESTRING(575000 5250000, 576000 5250000, 575500 5250000)')
&amp;gt;&amp;gt;&amp;gt; arcpy.CheckGeometry_management(ln, 'in_memory/ln_chk')
&amp;lt;Result 'in_memory\\ln_chk'&amp;gt;
&amp;gt;&amp;gt;&amp;gt; arcpy.GetCount_management("ln_chk")
&amp;lt;Result '0'&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356753#M28081</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T16:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356754#M28082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I leave the comma in, I&amp;nbsp; get this error message; "argument must be sequence of values"&lt;/P&gt;&lt;P&gt;If I leave it out I get this error message; "'list' object has no attribute 'union'"&lt;/P&gt;&lt;P&gt;If I remove the nulls with a sledge hammer appraoch (my effort below), your previous code (&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;row[&lt;/SPAN&gt;&lt;SPAN class="number" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: green; background-color: #f6f6f6;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;] = origGeom.union(origGeom) ) &lt;/SPAN&gt;works successfully.&lt;/P&gt;&lt;P&gt;My effort works on calculating shape.len into a new field and running a delete where len &amp;lt; 1 (in reality 20 is generally my shortist length)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(fc1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row.LINE_LENGTH &amp;lt; 5:&lt;/P&gt;&lt;P&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; rows.deleteRow(row)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 23:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356754#M28082</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-22T23:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356755#M28083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;with arcpy.da.UpdateCursor(fc, ["SHAPE@"]) as cur: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for shape, in cur: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if shape: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; shape = shape.union(shape) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cur.updateRow([shape])&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error you get is likely from Line #5 or my earlier code.&amp;nbsp; What is odd is that my earlier code worked when I tested on a feature class earlier today, but it generated the same error when I tried it tonight.&amp;nbsp; I must have tinkered enough to change something.&amp;nbsp; The code above here should work and not require removing NULLs or empty geometries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:41:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356755#M28083</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T16:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dissolve with arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356756#M28084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what I needed &lt;A href="https://community.esri.com/migrated-users/3420"&gt;Joshua Bixby&lt;/A&gt;​. Thanks for your assistance. That code with some automated topology code I have written let me cycle through 20,000 records and validate them in very quick fashion. It was a winner.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2015 09:38:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/dissolve-with-arcpy-da-updatecursor/m-p/356756#M28084</guid>
      <dc:creator>PeterShoemark</dc:creator>
      <dc:date>2015-09-23T09:38:27Z</dc:date>
    </item>
  </channel>
</rss>

