<SPAN class="comment token"># --- for posterity, c0 is a polygon circle with a piece cut off</SPAN> <SPAN class="comment token">#</SPAN> <SPAN class="keyword token">import</SPAN> json c0 <SPAN class="operator token"><</SPAN>Polygon object at <SPAN class="number token">0x15b885eb860</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0x15b87f800a8</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="operator token">></SPAN> j <SPAN class="operator token">=</SPAN> json<SPAN class="punctuation token">.</SPAN>loads<SPAN class="punctuation token">(</SPAN>c0<SPAN class="punctuation token">.</SPAN>JSON<SPAN class="punctuation token">)</SPAN> has_curves <SPAN class="operator token">=</SPAN> np<SPAN class="punctuation token">.</SPAN>any<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="string token">'curve'</SPAN> <SPAN class="keyword token">in</SPAN> i <SPAN class="keyword token">for</SPAN> i <SPAN class="keyword token">in</SPAN> list<SPAN class="punctuation token">(</SPAN>j<SPAN class="punctuation token">.</SPAN>keys<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">)</SPAN> has_curves <SPAN class="token boolean">True</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Now if you want to count the number of curves, you have to dig into the dictionary a bit more...
Just add this or equivalent to arcpy.da.Describe !!!
Sign in to post, follow content, and more. New here? Register for free.