<?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: Geometry is broken after running Python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060741#M61206</link>
    <description>&lt;P&gt;As I suggested.. if you are going to use cursors and work with geometry directly, use the geometry class in arcpy.&amp;nbsp; For example, see the Polygon class, buffer method&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/polygon.htm" target="_blank" rel="noopener"&gt;Polygon—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 22 May 2021 19:32:11 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-05-22T19:32:11Z</dc:date>
    <item>
      <title>Geometry is broken after running Python script</title>
      <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060729#M61203</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;I'm using ArcGIS Desktop10.6. I created Python script to process data, but I can't see any polygon after running the script. There is no error during the process and updated table is attached properly.&lt;/P&gt;&lt;P&gt;I run 'Check Geometry' tool and it returns "bad dataset extent".&lt;/P&gt;&lt;P&gt;I run 'Add Spatial Index' tool, but&amp;nbsp; Error999999 shows up.&lt;/P&gt;&lt;P&gt;Can you help me what is wrong with my script?&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;arcpy.AddField_management(OutFC, "FBreak", 'TEXT', "", "", 20, "", "NULLABLE")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;with arcpy.da.UpdateCursor(OutFC, ["SHAPE@","FBreak"]) as cursor:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp;for row in cursor:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Buff20 = arcpy.Buffer_analysis(row[0], arcpy.Geometry(), "20 meters")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; CFBreak = OutPut + '\\CFBreak'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; arcpy.Clip_analysis(FB, Buff20, CFBreak)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Count = arcpy.GetCount_management(CFBreak)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if Count == 0:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[1] = "None"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; elif Count &amp;gt;= 1:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;row[1] = "Exist"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pass&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; arcpy.Delete_management(CFBreak)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cursor.updateRow(row)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 13:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060729#M61203</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-22T13:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry is broken after running Python script</title>
      <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060737#M61204</link>
      <description>&lt;P&gt;Buffer and clip Analysis need to be using featureclasses&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/buffer.htm" target="_blank"&gt;Buffer (Analysis)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to use cursors, use the equivalent functions in the arcpy class structure&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 16:22:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060737#M61204</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-22T16:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry is broken after running Python script</title>
      <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060739#M61205</link>
      <description>&lt;P&gt;I changed Buffer part as:&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;Buff20 = OutPut + '\\Buff20'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva" size="2"&gt;arcpy.Buffer_analysis(row[0], Buff20, "20 meters", "", "", "NONE", "", "")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;However, result is same. I can't see polygon..&lt;/P&gt;&lt;P&gt;Is there any other suggestion?&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 17:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060739#M61205</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-22T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry is broken after running Python script</title>
      <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060741#M61206</link>
      <description>&lt;P&gt;As I suggested.. if you are going to use cursors and work with geometry directly, use the geometry class in arcpy.&amp;nbsp; For example, see the Polygon class, buffer method&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/classes/polygon.htm" target="_blank" rel="noopener"&gt;Polygon—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 May 2021 19:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060741#M61206</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-05-22T19:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Geometry is broken after running Python script</title>
      <link>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060757#M61208</link>
      <description>&lt;P&gt;Thanks Dan&lt;/P&gt;&lt;P&gt;I changed Buffer part as below, then I can see polygon and updated table!!&lt;/P&gt;&lt;P&gt;&lt;FONT face="verdana,geneva" size="2"&gt;Buff20 = row[0].buffer(20)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 May 2021 05:52:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/geometry-is-broken-after-running-python-script/m-p/1060757#M61208</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-05-23T05:52:53Z</dc:date>
    </item>
  </channel>
</rss>

