<?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: Doubts in arcpy.da.UpdateCursor in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189770#M14558</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank´s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 09 Nov 2019 23:04:23 GMT</pubDate>
    <dc:creator>SoratoSouza_e_Silva</dc:creator>
    <dc:date>2019-11-09T23:04:23Z</dc:date>
    <item>
      <title>Doubts in arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189768#M14556</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;My statement below create and update one new colunm with area calculated and after convert to other mensure splitting by 43560.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.env.workspace = "C://EsriTraining/PYTH/Cursors/Corvallis.gdb"&lt;/P&gt;&lt;P&gt;with arcpy.da.UpdateCursor("Parcel", ["SHAPE@AREA", "ACRES"]) as cursor:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for row in cursor:&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geom = row[0]&amp;nbsp;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;row[1] = geom / 43560&amp;nbsp;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cursor.updateRow(row)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why have I to use geom equals row [0]?? There is no geom colunm in my feature...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank´s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Nov 2019 18:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189768#M14556</guid>
      <dc:creator>SoratoSouza_e_Silva</dc:creator>
      <dc:date>2019-11-09T18:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Doubts in arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189769#M14557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/365175"&gt;André Souza&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sample script indeed does not&amp;nbsp;return the actual geometry, but a specific property of the geometry (in this case the&amp;nbsp;area of the geometry using the SHAPE@AREA token). See&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor-class.htm"&gt;UpdateCursor—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cursor is a collection of rows and each row is represented as a tuple. The way to access&amp;nbsp;the values in each row is by using the index. row[0] refers to the first item in the tuple that corresponds to the order of your field list, in this case the area in sq ft (&lt;A href="mailto:SHAPE@AREA)"&gt;SHAPE@AREA)&lt;/A&gt;. To convert this to acres you have to divide by 43560. The result is written to row[1] which refers to the ACRES field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Nov 2019 21:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189769#M14557</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-11-09T21:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Doubts in arcpy.da.UpdateCursor</title>
      <link>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189770#M14558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank´s&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Nov 2019 23:04:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/doubts-in-arcpy-da-updatecursor/m-p/189770#M14558</guid>
      <dc:creator>SoratoSouza_e_Silva</dc:creator>
      <dc:date>2019-11-09T23:04:23Z</dc:date>
    </item>
  </channel>
</rss>

