<?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: Intersection error issue in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/intersection-error-issue/m-p/1405597#M70253</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/438435"&gt;@V1212&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a tool over here that might help: &lt;A href="https://learn.finaldraftmapping.com/polygon-polygon-overlap-percentage-in-arcgis-pro-with-pairwise-intersect-and-arcpy/" target="_blank"&gt;https://learn.finaldraftmapping.com/polygon-polygon-overlap-percentage-in-arcgis-pro-with-pairwise-intersect-and-arcpy/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could use the tool, or refactor the code to suit your needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Apr 2024 07:19:51 GMT</pubDate>
    <dc:creator>Clubdebambos</dc:creator>
    <dc:date>2024-04-04T07:19:51Z</dc:date>
    <item>
      <title>Intersection error issue</title>
      <link>https://community.esri.com/t5/python-questions/intersection-error-issue/m-p/1405350#M70251</link>
      <description>&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Im trying to determine if 1307 or 1303 occupies more of the blue polygon. I need to do this for a series of polygons and want to automate this step this using python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 287px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99925i8BB1C0AE2CA192E6/image-dimensions/287x227?v=v2" width="287" height="227" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;for c_id, geometry_c in c_geometries.items():
    largest_intersection_h_id = None
    largest_intersection_area = 0

    for h_id, geometry_h in h_geometries.items():
        intersection = geometry_c.intersect(geometry_h, 4)  
        intersection_area = intersection.area

        if intersection_area &amp;gt; largest_intersection_area:
            largest_intersection_area = intersection_area
            largest_intersection_h_id = h_id

    if largest_intersection_h_id is not None:
        c_h_dict[c_id] = largest_intersection_h_id

for c_id, h_id in c_h_dict.items():
    print(c_id, h_id)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; I get this error message when I try this code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99929i59D0CD05102BD374/image-size/medium?v=v2&amp;amp;px=400" role="button" title="error.PNG" alt="error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; Thanks for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 18:10:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersection-error-issue/m-p/1405350#M70251</guid>
      <dc:creator>V1212</dc:creator>
      <dc:date>2024-04-03T18:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Intersection error issue</title>
      <link>https://community.esri.com/t5/python-questions/intersection-error-issue/m-p/1405597#M70253</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/438435"&gt;@V1212&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a tool over here that might help: &lt;A href="https://learn.finaldraftmapping.com/polygon-polygon-overlap-percentage-in-arcgis-pro-with-pairwise-intersect-and-arcpy/" target="_blank"&gt;https://learn.finaldraftmapping.com/polygon-polygon-overlap-percentage-in-arcgis-pro-with-pairwise-intersect-and-arcpy/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You could use the tool, or refactor the code to suit your needs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 07:19:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/intersection-error-issue/m-p/1405597#M70253</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2024-04-04T07:19:51Z</dc:date>
    </item>
  </channel>
</rss>

