<?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.Polygon JSON property crashing ArcCatalog in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-polygon-json-property-crashing-arccatalog/m-p/334974#M26165</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this is crude but it works.&amp;nbsp; Thinking there might be something slightly corrupt about the pou polygon, I decided to try adding this code in place of the last line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newPou = arcpy.Polygon(pou.getPart(0))&lt;/P&gt;&lt;P&gt;self.OutputPou = newPou.JSON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that worked.&amp;nbsp; I'm confident that the polygons I make will have but one part, but if you need to dump it into a for loop to get all parts you can do that too . . .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 23:02:06 GMT</pubDate>
    <dc:creator>DanNarsavage</dc:creator>
    <dc:date>2014-09-16T23:02:06Z</dc:date>
    <item>
      <title>arcpy.Polygon JSON property crashing ArcCatalog</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-polygon-json-property-crashing-arccatalog/m-p/334973#M26164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below is a snippet from a python class I created that accepts some esriJSON to create &amp;amp; manipulate some arcpy geometries and returns them as esriJSON.&amp;nbsp; The last line is crashing ArcCatalog 10.1 (with the "Please tell ESRI about this problem" dialog).&amp;nbsp; The "pou" is a fully-functioning arcpy.Polygon object (other than the JSON bit)--I can see its WKT, length, and area; and do other polygonal things with it like buffering &amp;amp; such.&amp;nbsp; Does anyone out there have any experience with this sort of thing?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pou = tracedLine.buffer(bufferMeters)&lt;/P&gt;&lt;P&gt;fPoint = tracedLine.firstPoint&lt;/P&gt;&lt;P&gt;lPoint = tracedLine.lastPoint&lt;/P&gt;&lt;P&gt;bPod = arcpy.PointGeometry(fPoint,self.sr)&lt;/P&gt;&lt;P&gt;ePod= arcpy.PointGeometry(lPoint,self.sr)&lt;/P&gt;&lt;P&gt;self.OutputPodB = bPod.JSON&lt;/P&gt;&lt;P&gt;self.OutputPodE = ePod.JSON&lt;/P&gt;&lt;P&gt;self.OutputPou = pou.JSON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ## This crashes Arc (even though all other arcpy.Geometry methods work fine on the pou object).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 21:18:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-polygon-json-property-crashing-arccatalog/m-p/334973#M26164</guid>
      <dc:creator>DanNarsavage</dc:creator>
      <dc:date>2014-09-16T21:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.Polygon JSON property crashing ArcCatalog</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-polygon-json-property-crashing-arccatalog/m-p/334974#M26165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this is crude but it works.&amp;nbsp; Thinking there might be something slightly corrupt about the pou polygon, I decided to try adding this code in place of the last line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newPou = arcpy.Polygon(pou.getPart(0))&lt;/P&gt;&lt;P&gt;self.OutputPou = newPou.JSON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that worked.&amp;nbsp; I'm confident that the polygons I make will have but one part, but if you need to dump it into a for loop to get all parts you can do that too . . .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 23:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-polygon-json-property-crashing-arccatalog/m-p/334974#M26165</guid>
      <dc:creator>DanNarsavage</dc:creator>
      <dc:date>2014-09-16T23:02:06Z</dc:date>
    </item>
  </channel>
</rss>

