<?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 3.2.2 Polygon getpart issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1388401#M69993</link>
    <description>&lt;P&gt;Thanks for your answer, I'm working with a FileGeodatabase. But&amp;nbsp; I realize that there was a issue with geometries at the feature class: Shape Areas were negatives.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture01.png" style="width: 375px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96205iCB806E9FEDDECE65/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture01.png" alt="Capture01.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I used "Repair Geometries" Tool to fix geometries, and everything start to works fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura02.png" style="width: 442px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96206i3C987DBCFECD4163/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura02.png" alt="Captura02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get this output from tool:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura03.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96207i3D4F6F8E4F329AF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura03.png" alt="Captura03.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 23:16:58 GMT</pubDate>
    <dc:creator>MarceloCesarTorres</dc:creator>
    <dc:date>2024-02-28T23:16:58Z</dc:date>
    <item>
      <title>Arcpy 3.2.2 Polygon getpart issue</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1386078#M69942</link>
      <description>&lt;P&gt;I'm trying to get polygon parts&amp;nbsp; but I get an exception:&lt;/P&gt;&lt;P&gt;File "c:\Users\Mtorres\source\repos\FFP-ArcGISPro-Project\src\Public Inspection\Python Toolboxes\PublicInspectionArcGIS\Centerline.py", line 73, in _extract_parts_from_input_geometry&lt;BR /&gt;part = geometry.getPart(index)&lt;BR /&gt;File "c:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\arcobjects\arcobjects.py", line 1331, in getPart&lt;BR /&gt;return convertArcObjectToPythonObject(self._arc_object.GetPart(*gp_fixargs(args)))&lt;BR /&gt;RuntimeError: DescribeGeometry: Error in getting part from geometry&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The script runs on ArcGIS Pro v3.2.2. Next script code fragment where I make the call:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;parts&lt;/SPAN&gt;&lt;SPAN&gt; = []&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;input_geometry&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt; &lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;.isMultipart :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;part_range&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;input_geometry&lt;/SPAN&gt;&lt;SPAN&gt;.partCount)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;part_range&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;for&lt;/SPAN&gt; &lt;SPAN&gt;index&lt;/SPAN&gt; &lt;SPAN&gt;in&lt;/SPAN&gt; &lt;SPAN&gt;part_range&lt;/SPAN&gt;&lt;SPAN&gt; :&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;part&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;geometry&lt;/SPAN&gt;&lt;SPAN&gt;.getPart(&lt;/SPAN&gt;&lt;SPAN&gt;index&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;parts&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;append&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;part&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;parts&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I run the same code on ArcGIS Pro 3.1but the exception never happens.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there an error with last version of arcpy?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Marcelo&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 23 Feb 2024 16:10:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1386078#M69942</guid>
      <dc:creator>MarceloCesarTorres</dc:creator>
      <dc:date>2024-02-23T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy 3.2.2 Polygon getpart issue</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1388189#M69986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/484333"&gt;@MarceloCesarTorres&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not able to reproduce your error in 3.2.2 nor in 3.1.3, at least in my personal environment (FileGDB and PostgreSQL -ST_Geometry). Are you working in an enterprise geodatabase? Shapefiles? In memory?&lt;/P&gt;&lt;P&gt;I'd perform a geometry check just in case and make sure you are working with proper geometries.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 18:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1388189#M69986</guid>
      <dc:creator>Kepa</dc:creator>
      <dc:date>2024-02-28T18:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy 3.2.2 Polygon getpart issue</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1388401#M69993</link>
      <description>&lt;P&gt;Thanks for your answer, I'm working with a FileGeodatabase. But&amp;nbsp; I realize that there was a issue with geometries at the feature class: Shape Areas were negatives.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture01.png" style="width: 375px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96205iCB806E9FEDDECE65/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture01.png" alt="Capture01.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I used "Repair Geometries" Tool to fix geometries, and everything start to works fine.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura02.png" style="width: 442px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96206i3C987DBCFECD4163/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura02.png" alt="Captura02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get this output from tool:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Captura03.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/96207i3D4F6F8E4F329AF9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura03.png" alt="Captura03.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 23:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-3-2-2-polygon-getpart-issue/m-p/1388401#M69993</guid>
      <dc:creator>MarceloCesarTorres</dc:creator>
      <dc:date>2024-02-28T23:16:58Z</dc:date>
    </item>
  </channel>
</rss>

