<?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: arcpy.da.UpdateCursor fails to update geometry in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817147#M2690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, well how many features are in the layer definition?&lt;/P&gt;&lt;P&gt;Can you print out the ID and featurecount?&lt;/P&gt;&lt;P&gt;I assume you are using some sort of index based on the ID to get the respective geometry to add?&lt;/P&gt;&lt;P&gt;Why are you getting the geometry out twice in the updateCursor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2017 11:30:11 GMT</pubDate>
    <dc:creator>KimOllivier</dc:creator>
    <dc:date>2017-01-27T11:30:11Z</dc:date>
    <item>
      <title>arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817142#M2685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the following issue when i try to update an SDE Geodatabase featureclass geometry from arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Using&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;ArcGIS 10.3.1&lt;/P&gt;&lt;P&gt;SQL Server Geodatabase&lt;/P&gt;&lt;P&gt;Line featureclass with enabled: Archiving , Editor Tracking and Registered as Versioned.&lt;/P&gt;&lt;P&gt;The line featureclass also participates in a replica as the source layer.&lt;/P&gt;&lt;P&gt;The line fetureclass can be edited fine from arcmap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The issue&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;Because we do receive new updated line geometries (features) from another source i have bulid a python script that joins the 2 datasets based on an attribute key and and tries to update the geometry on the Line Featureclass.&lt;/P&gt;&lt;P&gt;I am using the following code tu update the geometry.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fieldNames &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ID'&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;&lt;SPAN class="string token"&gt;'SHAPE@WKT'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;startOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;line_layer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fieldNames&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; updateCursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; tmpRow &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; updateCursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; tmpRow&lt;SPAN class="punctuation 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="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#newgeometry that was read previusly&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; updateCursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;tmpRow&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopOperation&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
edit&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;stopEditing&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code runs without any error but the geometry is not updated. I tested the code for other attributes and they were updated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:39:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817142#M2685</guid>
      <dc:creator>BledarBirbo1</dc:creator>
      <dc:date>2021-12-12T09:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817143#M2686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after you set the values with the cursor for the row, you need to have cursor.updateRow(tmpRow), otherwise it doesn't save the values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the following to a new line after the current line 6&amp;nbsp;with the same indent as line 6:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;cursor&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;updateRow&lt;/SPAN&gt;&lt;SPAN&gt;(tmpR&lt;/SPAN&gt;&lt;SPAN&gt;ow&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/data-access/updatecursor-class.htm"&gt;https://pro.arcgis.com/en/pro-app/arcpy/data-access/updatecursor-class.htm&lt;/A&gt;&amp;nbsp;example 1 for another example if needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2017 13:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817143#M2686</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2017-01-26T13:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817144#M2687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an update command i just forgot to copy it in this post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that do not help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jan 2017 14:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817144#M2687</guid>
      <dc:creator>BledarBirbo1</dc:creator>
      <dc:date>2017-01-26T14:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817145#M2688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have skipped the key item - what geometry are you adding? How did you get it? Is it really&amp;nbsp; a geometry?&lt;/P&gt;&lt;P&gt;I don't think you can join two featureclasses and retrieve both geometries at once. You are probably just replacing the geometry with itself.&lt;/P&gt;&lt;P&gt;I would create a python dictionary of source geometries keyed by the id using a list comprehension and a ReadCursor.&lt;/P&gt;&lt;P&gt;Then close the cursor and open an UpdateCursor and iterate over the list. You could even speed it up&lt;/P&gt;&lt;P&gt;by using an SQL query to only select records to be updated with an IN sql clause of the keys.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 09:40:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817145#M2688</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2017-01-27T09:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817146#M2689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The geometry that is beeing assigned is not the same and is fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 10:45:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817146#M2689</guid>
      <dc:creator>BledarBirbo1</dc:creator>
      <dc:date>2017-01-27T10:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817147#M2690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, well how many features are in the layer definition?&lt;/P&gt;&lt;P&gt;Can you print out the ID and featurecount?&lt;/P&gt;&lt;P&gt;I assume you are using some sort of index based on the ID to get the respective geometry to add?&lt;/P&gt;&lt;P&gt;Why are you getting the geometry out twice in the updateCursor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 11:30:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817147#M2690</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2017-01-27T11:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817148#M2691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 300 new features that are beeing read from a SearchCursor.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Their geometry is then stored on a python list as Geometry object and as WKT plus the OBJECTID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During the UpdateCursor each feature is matched with the ones that were read before from the python list based on OBJECTID. &amp;nbsp;If matched then the&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;CODE&gt; tmpRow&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;] = objectlist[matchedindex] geometry.
#even constructing a new Geometry from the WKT like this does not work 
&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;CODE&gt;tmpRow&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;[&lt;/SPAN&gt;&lt;SPAN class="" style="color: #990000; border: 0px; font-weight: inherit;"&gt;1&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;] = arcpy.FromKWT(objectlist[matchedindex] wkt)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;

&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817148#M2691</guid>
      <dc:creator>BledarBirbo1</dc:creator>
      <dc:date>2021-12-12T09:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817149#M2692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this too simple? If the geometry is WKT format then the insert should use tmpRow[2] not tmpRow[1] because the field spec you must have is &lt;A href="mailto:SHAPE@WKT"&gt;SHAPE@WKT&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 11:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817149#M2692</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2017-01-27T11:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817150#M2693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than a list of geometries a dictionary of geometries is more direct to insert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 11:55:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817150#M2693</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2017-01-27T11:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817151#M2694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need a geometry AND a wkt version? Surely one will do. You would have to be careful to get the one in the list.&lt;/P&gt;&lt;P&gt;Would it not be easier to just write&amp;nbsp; row[1] = objectdict[row[0]] where the objectdict is a dictionary of shapes indexed by ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to help you debug your code, so I would put in a lot of print statements that confirm you do have a geometry and it is&lt;/P&gt;&lt;P&gt;in the right row element by printing out a WKT representation as you go and then break after the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you only put up pseudocode you are hiding your problem with your assumptions on where the problem lies. It would be much better&lt;/P&gt;&lt;P&gt;if you posted your real code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 12:04:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817151#M2694</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2017-01-27T12:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817152#M2695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;kimo wrote:&lt;/P&gt;&lt;P&gt;Do you need a geometry AND a wkt version? Surely one will do. You would have to be careful to get the one in the list.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV class=""&gt;&lt;P&gt;This is the key point.&amp;nbsp; By specifying an update of the same column in two different forms, but only updating the first referenced input, the code is likely updating the column with the new content, then updating it again with the previous contents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Multiple references to the same geometry column in an UPDATE or INSERT cursor really ought to raise an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 15:02:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817152#M2695</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2017-01-27T15:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817153#M2696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Leaving only the SHAPE@WKT&amp;nbsp;field in the UpdateCursor and updating only that fixed it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 16:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817153#M2696</guid>
      <dc:creator>BledarBirbo1</dc:creator>
      <dc:date>2017-01-27T16:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.da.UpdateCursor fails to update geometry</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817154#M2697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why use &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;SHAPE@WKT&lt;/SPAN&gt; instead of &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;SHAPE@&lt;/SPAN&gt; ?&amp;nbsp; From a performance perspective, I can't imagine returning the WKT instead of a geometry object saves much, and there are cases where the WKT doesn't exactly equal the geometry.&amp;nbsp; For example, with curves:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; esri_json &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&amp;nbsp; 
&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; &lt;SPAN class="string token"&gt;"curvePaths"&lt;/SPAN&gt;&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; 
&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; &lt;SPAN class="punctuation 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="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&amp;nbsp; 
&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; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"c"&lt;/SPAN&gt;&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;&lt;SPAN class="number token"&gt;7&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&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;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation 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;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&amp;nbsp; 
&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; &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; 
&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; &lt;SPAN class="string token"&gt;"spatialReference"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"wkid"&lt;/SPAN&gt;&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;&amp;nbsp; 
&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; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&amp;nbsp; 
&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; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; ln &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AsShape&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;esri_json&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; ln&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSON
u&lt;SPAN class="string token"&gt;'{"curvePaths":[[[1,5],{"c":[[7,3],[6,2]]}]],"spatialReference":{"wkid":null}}'&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FromWKT&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ln&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WKT&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSON
u&lt;SPAN class="string token"&gt;'{"paths":[[[1,5],[0.99399503194559768,4.9030739951953093],[0.99088008165787445,4.8060121224880596],[0.99065791395499181,4.7089005336315006],[0.99332872603216815,4.6118254245067529],[0.99889014728664582,4.5148729586156593], ..., [6.7724322738783158,2.6854575752247012],[6.8328139890149053,2.7615151752781921],[6.8909032081665362,2.8393377469851719],[6.9466483715607055,2.9188562153236042],[7,3]]],"spatialReference":{"wkid":null}}'&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the example above, the true curve is approximated when dumped out in WKT, and regenerating the geometry from that WKT makes for a different geometry, although practically the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-da-updatecursor-fails-to-update-geometry/m-p/817154#M2697</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T09:39:43Z</dc:date>
    </item>
  </channel>
</rss>

