I need to take vertex coordinates and draw them as polygons using da.InsertCursor. However, it is giving me random results. The script keeps running but many features show empty geometry:
Here is the code I use with 2 ticket examples - one can be inserted with geometry but the other one not.
<SPAN class="comment token"># Define Ticket</SPAN>
<SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">Ticket</SPAN><SPAN class="punctuation token">(</SPAN>object<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
id <SPAN class="operator token">=</SPAN> <SPAN class="number token">0</SPAN>
coordinates <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN>
cleanCoordinates <SPAN class="operator token">=</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="punctuation token">]</SPAN>
<SPAN class="keyword token">def</SPAN> <SPAN class="token function">__init__</SPAN><SPAN class="punctuation token">(</SPAN>self<SPAN class="punctuation token">,</SPAN> id<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
self<SPAN class="punctuation token">.</SPAN>id <SPAN class="operator token">=</SPAN> id
<SPAN class="comment token"># Sample tickets</SPAN>
ticket1 <SPAN class="operator token">=</SPAN> Ticket<SPAN class="punctuation token">(</SPAN><SPAN class="number token">30190000001</SPAN><SPAN class="punctuation token">)</SPAN>
ticket1<SPAN class="punctuation token">.</SPAN>coordinates <SPAN class="operator token">=</SPAN> <SPAN