<?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: Hole lies outside shell and arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365572#M28871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The geometry team has reviewed this issue and wanted to convey the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The geometry in question is OGC Multipolygon type. If you look carefully it has three rings (with the two rings being in the second part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While Esri polygon geometry type can represent both OGC Multipolygon and OGC Polygon types, it represents both as a collection of rings with exterior rings being clockwise and holes being counterclockwise.&amp;nbsp; When the Multipolygon in question is converted to Esri format it becomes a three ring polygon, and it is valid as far as Esri simple geometry &amp;nbsp;is concerned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The OGC specification of simple features is more strict than Esri’s. To help with interoperability we’ve added the OGC option in the Check geometry and Repair Geometry tools.&amp;nbsp; When the OGC option is used, we check additional rules of the OGC spec and ensure that the polygon rings are sorted such that holes follow exterior rings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What looks like the bowtie highlighted with blue color is actually two rings touching at a vertex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how to fix the original polygon to be valid for OGC spec:&lt;/P&gt;&lt;P&gt;MULTIPOLYGON(((18.580058 54.387989,18.580688 54.387949,18.581455 54.38745,18.58103 54.387236,18.581292 54.387046,18.581613 54.387193,18.581928 54.387025,18.581818 54.386618,18.581261 54.386702,18.580977 54.38657,18.581072 54.386234,18.580021 54.385724,18.579978 54.386042,18.580181 54.386148,18.579153 54.386818,18.579249 54.386861,18.578992 54.387036,18.578708 54.386886,18.578114 54.386992,18.57806 54.387864,18.578553 54.388089,18.580058 54.387989) &lt;STRONG style="color: red; "&gt;move it here&lt;/STRONG&gt;),((18.580058 54.387989,18.58009 54.388582,18.580315 54.388695,18.581319 54.388631,18.580058 54.387989),&lt;STRONG style="color: red; "&gt;(18.580058 54.387989,18.579111 54.387517,18.579764 54.38739,18.580048 54.387528,18.580058 54.387989)&lt;/STRONG&gt;))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only requires moving the last ring int the first POLYGON part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Nov 2019 15:22:10 GMT</pubDate>
    <dc:creator>KoryKramer</dc:creator>
    <dc:date>2019-11-27T15:22:10Z</dc:date>
    <item>
      <title>Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365559#M28858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my workflow, I am converting our mapset in ESRI (ArcGIS 10.7) FileGeodb (topological clean and no geometry error) to Postgis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In PostGIS I am getting a geometry validation error&amp;nbsp; "Hole lies outside shell" and I am thinking how to find this error&amp;nbsp;using arcpy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is polygon where I am getting this error.&lt;/P&gt;&lt;P&gt;MULTIPOLYGON(((18.580058 54.387989,18.580688 54.387949,18.581455 54.38745,18.58103 54.387236,18.581292 54.387046,18.581613 54.387193,18.581928 54.387025,18.581818 54.386618,18.581261 54.386702,18.580977 54.38657,18.581072 54.386234,18.580021 54.385724,18.579978 54.386042,18.580181 54.386148,18.579153 54.386818,18.579249 54.386861,18.578992 54.387036,18.578708 54.386886,18.578114 54.386992,18.57806 54.387864,18.578553 54.388089,18.580058 54.387989)),((18.580058 54.387989,18.58009 54.388582,18.580315 54.388695,18.581319 54.388631,18.580058 54.387989),(18.580058 54.387989,18.579111 54.387517,18.579764 54.38739,18.580048 54.387528,18.580058 54.387989)))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know st_makevalid() will correct this problem. What I want, is to correct my source data which is in FileGeodb.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 10:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365559#M28858</guid>
      <dc:creator>irfanlatif</dc:creator>
      <dc:date>2019-11-21T10:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365560#M28859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to add an enclosing set of brackets to make the two multipart shapes represent 1 shape&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;z1 &lt;SPAN class="operator 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;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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;18.580688&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387949&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;18.581455&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.38745&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;18.58103&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387236&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;18.581292&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387046&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;18.581613&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387193&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;18.581928&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387025&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;18.581818&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386618&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;18.581261&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386702&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;18.580977&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.38657&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;18.581072&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386234&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;18.580021&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.385724&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;18.579978&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386042&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;18.580181&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386148&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;18.579153&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386818&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;18.579249&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386861&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;18.578992&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387036&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;18.578708&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386886&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;18.578114&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.386992&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;18.57806&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387864&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;18.578553&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.388089&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;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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="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;&lt;SPAN class="number token"&gt;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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;18.58009&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.388582&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;18.580315&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.388695&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;18.581319&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.388631&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;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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;18.579111&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387517&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;18.579764&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.38739&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;18.580048&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387528&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;18.580058&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;54.387989&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="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;/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;The two blocks ( lines 2 - 9 and lines 10 - 13)&amp;nbsp;&lt;/P&gt;&lt;P&gt;weren't closed in&amp;nbsp; the [ on line 1 and on line 14&lt;/P&gt;&lt;P&gt;Sorry for converting tuples of tuples to lists of lists... just easier to visualize for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:59:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365560#M28859</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T16:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365561#M28860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Irfan is correct that ArcGIS does not detect that the geometry is OGC-invalid, here is how it looks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="474186" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/474186_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore ArcGIS's Repair Geometry is not an option.&amp;nbsp; I'll ask the team to look at that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Pro we have the osgeo and ogr modules, somewhere in there is the MakeValid() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Data Interoperability/FME you can de-aggregate the offending bowtie feature which will then need more work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="474194" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/474194_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365561#M28860</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2019-11-21T14:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365562#M28861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a true multipart geometry (&lt;EM&gt;since Esri exports all polygon WKT as MULTIPOLYGON, the 'MULTI' doesn't mean the polygon has multiple parts&lt;/EM&gt;), and one of the two parts in invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Specifically, the first part is valid and the second part is invalid because it self-intersects.&amp;nbsp; In the screenshot below, red vertices are from the first part while blue vertices are from the second part.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="474196" alt="" class="jive-emoji image-1 jive-image" height="412" src="https://community.esri.com/legacyfs/online/474196_Capture.PNG" width="519" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;If I run Check Geometry, it catches the invalid polygon and states self-intersection as the problem.&lt;/SPAN&gt;&amp;nbsp; Once a polygon is invalid, there is no silver bullet for fixing it.&amp;nbsp; Sure, there are methods that can clean it up, but assumptions are made along the way by the tools, and those assumptions might not work for the user.&amp;nbsp; Since the shape of the polygon means something specific to the record in the data set, cleaning up an invalid manually is the only way to ensure the updated polygon accurately represents what it is supposed to represent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365562#M28861</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-11-21T14:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365563#M28862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;&lt;A href="https://community.esri.com/migrated-users/3241"&gt;Bruce Harold&lt;/A&gt;‌, I am confused by your statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;ArcGIS does not detect that the geomety is OGC-invalid&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;If I run the geometry through Check Geometry using ArcGIS 10.7.1, it flags the polygon as self-intersecting, which is OGC-invalid.&amp;nbsp; Unfortunately Repair Geometry fails to fix it, but detecting an issue and being able to fix it are separate issues.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&amp;nbsp; As mentioned in another response, I created the polygon in a spatial reference that rounded the original coordinates, thus creating the self-intersection (or maybe one could argue showed the self-intersection).&amp;nbsp; When using a geographic spatial reference with higher precision, the Check Geometry tool does see the polygon as invalid.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365563#M28862</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-11-21T14:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365564#M28863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcGIS Pro's Check Geometry has an OGC validation method.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/check-geometry.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/check-geometry.htm"&gt;Check Geometry—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/474197_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;Would that work in this case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 14:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365564#M28863</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2019-11-21T14:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365565#M28864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm confused too!&amp;nbsp; I created a feature class from the WKT using Workbench and it made the below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="474203" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/474203_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here it is as WKT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="474202" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/474202_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;Aside from the precision this looks like what went in, and 10.7.1 Check Geometry reports nothing for me.&amp;nbsp; Like you say it needs manual work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 15:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365565#M28864</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2019-11-21T15:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365566#M28865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well Pro with the OGC option eports 'non-simple' as an issue, which is better than using 10.7.1, but not as good as the GeometryValidator in Workbench which provides issue details and&amp;nbsp; location:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(string) : `_issues{0}.issue_found' has value `Fails OGC Valid'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(64 bit real) : `_issues{0}.location_sample.x' has value `18.579111'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(64 bit real) : `_issues{0}.location_sample.y' has value `54.387517'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(string) : `_issues{0}.repair_state' has value `Not Fully Repaired'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(string) : `_issues{0}.supplementary_info' has value `Hole Outside Shell'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(string) : `_issues{0}.supplementary_info{0}.details' has value `Hole Outside Shell'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(64 bit real) : `_issues{0}.supplementary_info{0}.location.x' has value `18.579111'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;GeometryTrait(64 bit real) : `_issues{0}.supplementary_info{0}.location.y' has value `54.387517'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="-qt-block-indent: 0; text-indent: 0px; margin: 0px;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 15:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365566#M28865</guid>
      <dc:creator>BruceHarold</dc:creator>
      <dc:date>2019-11-21T15:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365567#M28866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ofter can't find self intersections with the Check Geometry Tool, it is a bit unreliable especially with very small mistakes. I can offer several shapes with self intersections not found by Check Geometry Tool (10.4.1) - unfortunately I don't have pro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 15:31:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365567#M28866</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2019-11-21T15:31:19Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365568#M28867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured out the issue.&amp;nbsp; I wasn't paying attention to the values themselves and squeezed the polygon into a projected coordinate space, which did some rounding and created the self-intersection.&amp;nbsp; Oddly, the WKT back out from the rounded polygon wasn't rounded itself, but maybe Check Geometry is applying the XY tolerance and not the ArcPy WKT constructor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 15:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365568#M28867</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-11-21T15:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365569#M28868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which&amp;nbsp;software you are using for&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;Check Geometry&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;I am also runing check geometry (ArcGIS 10.7) but not catching any thing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 16:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365569#M28868</guid>
      <dc:creator>irfanlatif</dc:creator>
      <dc:date>2019-11-21T16:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365570#M28869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I mentioned above, I put the coordinates into a projected spatial reference with lower tolerances, which appears to have done rounding and allowed Check Geometry to find the self-intersection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example geometry you provide raises several issues with Esri tools and underlying geometry model, so in that regard it is a good example, but that doesn't help you easily here since there are no easy workaround for the issues your example polygon raises.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 17:39:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365570#M28869</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-11-21T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365571#M28870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt; &lt;SPAN&gt;everyone&lt;/SPAN&gt; for your input.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As Joshua mention in ESRI &lt;SPAN&gt;environment&lt;/SPAN&gt; there is no easy solution. &lt;SPAN&gt;So&amp;nbsp;I&lt;/SPAN&gt; have to go &lt;SPAN&gt;outside&lt;/SPAN&gt; for help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I build a &lt;SPAN&gt;small&lt;/SPAN&gt; function using ogr to&amp;nbsp;validate&amp;nbsp;geometry. I have used buffer0 which is not a good option. If you have &lt;SPAN&gt;incorrect&lt;/SPAN&gt; ring &lt;SPAN&gt;odder&lt;/SPAN&gt;, you may &lt;SPAN&gt;end&lt;/SPAN&gt; up with duplicate geometry. In my case it works fine as my base data is validated first with ESRI tools &lt;SPAN&gt;and then &lt;/SPAN&gt;with ogr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;ogr_Validate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;    
    &lt;SPAN class="string token"&gt;"""
    Used to validate input shapefile geometries with ogr
    INPUTS:
            fc(req) = path to fc            
            example. ogr_Validate(fc)
    IMP: Used buffer0 which in case of incorrect ring oder can produce duplicate geometries.    
    """&lt;/SPAN&gt;

    inFc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ogr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; update &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    inFc_lyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; inFc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetLayer&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; feature &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; inFc_lyr&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        geom &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetGeometryRef&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;            
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; geom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;IsValid&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="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Cleaning feature:      "&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetField&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lst_Fields&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&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;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;        
            feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetGeometry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;geom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Buffer&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;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;            
            inFc_lyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetFeature&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;feature&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
            &lt;SPAN class="keyword token"&gt;assert&lt;/SPAN&gt; feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GetGeometryRef&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;IsValid&lt;SPAN class="punctuation token"&gt;(&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;/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;&lt;/P&gt;&lt;P&gt;Reference:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/263696/invalid-geometries-made-valid-dont-remain-valid" title="https://gis.stackexchange.com/questions/263696/invalid-geometries-made-valid-dont-remain-valid" rel="nofollow noopener noreferrer" target="_blank"&gt;python - Invalid geometries made valid don't remain valid? - Geographic Information Systems Stack Exchange&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365571#M28870</guid>
      <dc:creator>irfanlatif</dc:creator>
      <dc:date>2021-12-11T16:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365572#M28871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The geometry team has reviewed this issue and wanted to convey the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The geometry in question is OGC Multipolygon type. If you look carefully it has three rings (with the two rings being in the second part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;While Esri polygon geometry type can represent both OGC Multipolygon and OGC Polygon types, it represents both as a collection of rings with exterior rings being clockwise and holes being counterclockwise.&amp;nbsp; When the Multipolygon in question is converted to Esri format it becomes a three ring polygon, and it is valid as far as Esri simple geometry &amp;nbsp;is concerned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The OGC specification of simple features is more strict than Esri’s. To help with interoperability we’ve added the OGC option in the Check geometry and Repair Geometry tools.&amp;nbsp; When the OGC option is used, we check additional rules of the OGC spec and ensure that the polygon rings are sorted such that holes follow exterior rings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What looks like the bowtie highlighted with blue color is actually two rings touching at a vertex.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how to fix the original polygon to be valid for OGC spec:&lt;/P&gt;&lt;P&gt;MULTIPOLYGON(((18.580058 54.387989,18.580688 54.387949,18.581455 54.38745,18.58103 54.387236,18.581292 54.387046,18.581613 54.387193,18.581928 54.387025,18.581818 54.386618,18.581261 54.386702,18.580977 54.38657,18.581072 54.386234,18.580021 54.385724,18.579978 54.386042,18.580181 54.386148,18.579153 54.386818,18.579249 54.386861,18.578992 54.387036,18.578708 54.386886,18.578114 54.386992,18.57806 54.387864,18.578553 54.388089,18.580058 54.387989) &lt;STRONG style="color: red; "&gt;move it here&lt;/STRONG&gt;),((18.580058 54.387989,18.58009 54.388582,18.580315 54.388695,18.581319 54.388631,18.580058 54.387989),&lt;STRONG style="color: red; "&gt;(18.580058 54.387989,18.579111 54.387517,18.579764 54.38739,18.580048 54.387528,18.580058 54.387989)&lt;/STRONG&gt;))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It only requires moving the last ring int the first POLYGON part.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365572#M28871</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2019-11-27T15:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hole lies outside shell and arcpy</title>
      <link>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365573#M28872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/45316"&gt;Kory Kramer&lt;/A&gt;‌, see my &lt;A href="https://community.esri.com/message/894376-check-geometry-fails-in-shared-origin-edge-case"&gt;https://community.esri.com/message/894376-check-geometry-fails-in-shared-origin-edge-case&lt;/A&gt; thread that highlights a defect in Check Geometry that fails to identify invalid geometries in certain edge cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Dec 2019 03:56:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/hole-lies-outside-shell-and-arcpy/m-p/365573#M28872</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-12-02T03:56:08Z</dc:date>
    </item>
  </channel>
</rss>

